Skip to content

Commit

Permalink
Merge pull request #1 from springfox/master
Browse files Browse the repository at this point in the history
merge origin master
  • Loading branch information
dulong committed Aug 7, 2019
2 parents 379f0ce + 8ba0627 commit c9f3fe0
Show file tree
Hide file tree
Showing 344 changed files with 15,630 additions and 10,382 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Expand Up @@ -14,9 +14,9 @@ jobs:
- checkout
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "gradle/dependencies.gradle" }}
# - run:
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
# command: sudo chmod +x ./gradlew
# - run:
# name: Chmod permissions #if permission for Gradlew Dependencies fail, use this.
# command: sudo chmod +x ./gradlew
- run:
name: Download Dependencies
command: ./gradlew dependencies
Expand All @@ -41,10 +41,10 @@ jobs:
- run:
name: Save test results
command: |
mkdir -p ~/junit/
mkdir -p ~/reports/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
cp -R swagger-contract-tests/build/reports/tests ~/reports
mkdir -p ~/junit/
mkdir -p ~/reports/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/junit/ \;
cp -R swagger-contract-tests/build/reports/tests ~/reports
when: always
- store_test_results:
path: ~/junit
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -18,3 +18,5 @@ out/
*.hprof
node_modules/
package-lock.json
.eclipse/
bin/
2 changes: 1 addition & 1 deletion .version
@@ -1 +1 @@
3.0.0-SNAPSHOT
3.0.0-SNAPSHOT
13 changes: 8 additions & 5 deletions build.gradle
Expand Up @@ -9,17 +9,20 @@ buildscript {
dependencies {
classpath "com.github.adrianbk:gradle-jvmsrc-plugin:0.6.1"
classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2"
classpath "com.github.adrianbk:gradle-travisci-trigger-plugin:1.0.0"
classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4"
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.7.5"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.5.8.1"
classpath "org.ajoberstar:gradle-git:1.7.2"
classpath 'org.ajoberstar:gradle-git-publish:1.0.1'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.9.3"
classpath "org.asciidoctor:asciidoctor-gradle-plugin:1.6.0"
classpath 'org.ajoberstar.grgit:grgit-core:3.0.0'
classpath 'org.ajoberstar:gradle-git-publish:2.0.0'
}
}

plugins {
id "net.ltgt.apt-idea" version "0.21"
}

apply from: "$rootDir/gradle/dependencies.gradle"
apply from: "$rootDir/gradle/ide.gradle"
apply plugin: 'com.github.ben-manes.versions'
Expand Down
Expand Up @@ -20,10 +20,10 @@ class BuildInfoFactory {
def isReleaseBuild = project.gradle.startParameter.taskNames.contains("release")

SemanticVersion buildVersion = versioningStrategy.buildVersion(releaseType, isReleaseBuild)
project.logger.lifecycle("[RELEASE] current verison: ${versioningStrategy.current()}, " +
project.logger.lifecycle("[RELEASE] current verison: ${versioningStrategy.current(project)}, " +
"build version: $buildVersion, dryRun: $dryRun, releaseBuild: $isReleaseBuild")
new BuildInfo(
versioningStrategy.current(),
versioningStrategy.current(project),
buildVersion,
releaseType,
isReleaseBuild,
Expand Down
Expand Up @@ -29,8 +29,8 @@ class FileVersionStrategy implements VersioningStrategy, GitTaggingSupport, GitV
}

@Override
SemanticVersion current() {
parseTransform(lastAnnotatedTag(), "")
SemanticVersion current(Project project) {
parseTransform(lastAnnotatedTag(project), "")
}

@Override
Expand Down
Expand Up @@ -17,8 +17,8 @@ class GitDescribeVersioningStrategy implements VersioningStrategy, GitVersionPar
}

@Override
SemanticVersion current() {
parseTransform(lastAnnotatedTag(), buildNumberFormat)
SemanticVersion current(Project project) {
parseTransform(lastAnnotatedTag(project), buildNumberFormat)
}

@Override
Expand Down
Expand Up @@ -5,18 +5,18 @@ import springfox.gradlebuild.BuildInfo

trait GitTaggingSupport {

String lastAnnotatedTag() {
def proc = "git describe --exact-match".execute();
String lastAnnotatedTag(Project project) {
def proc = "git -C ${project.getRootDir().toString()} describe --exact-match".execute();
proc.waitFor();
if (proc.exitValue() == 0) {
return proc.text.trim()
}
proc = "git describe".execute()
proc = "git -C ${project.getRootDir().toString()} describe".execute()
proc.waitFor()
if (proc.exitValue() == 0) {
return proc.text.trim()
}
return ""
return "2.9.3"
}

def createAnnotatedTag(Project project, BuildInfo buildInfo) {
Expand Down
Expand Up @@ -6,7 +6,7 @@ import springfox.gradlebuild.BuildInfo
interface VersioningStrategy {
SemanticVersion buildVersion(ReleaseType releaseType, boolean isReleaseBuild)
SemanticVersion nextVersion(SemanticVersion buildVersion, ReleaseType releaseType, boolean isReleaseBuild)
SemanticVersion current()
SemanticVersion current(Project project)
void persist(Project project, BuildInfo buildInfo)

}
142 changes: 104 additions & 38 deletions config/checkstyle.xml
@@ -1,14 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
"http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">

<!-- A set of Checkstyle rules that should be applied to non-legacy modules that should adhere to relatively strict
code style rules. -->
<module name="Checker">

<property name="severity" value="error"/>

<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value=".*generated-test-sources.*\.java$"/>
</module>

<!-- Whitespace checks http://checkstyle.sourceforge.net/config_whitespace.html -->
<module name="FileTabCharacter"/>

Expand All @@ -25,53 +30,92 @@
value="Calls to Throwable.printStackTrace() are not allowed. Log the exception instead."/>
</module>

<!--
Along with the FileContentsHolder module, allows for adding comments to source code to suppress checks.
http://checkstyle.sourceforge.net/config.html#Filters
-->
<module name="SuppressionCommentFilter"/>

<module name="TreeWalker">
<!-- Along with the SuppressWarningsHolder module, enables support for @SuppressWarnigns annotation -->
<module name="SuppressWarningsFilter"/>

<!--
Along with the SuppressionCommentFilter module, allows for adding comments to source code to suppress checks.
http://checkstyle.sourceforge.net/config.html#Filters
-->
<module name="FileContentsHolder"/>
<!-- Checks whether files end with a new line. -->
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
<!--<module name="NewlineAtEndOfFile"/>-->

<!-- Import checks - http://checkstyle.sourceforge.net/config_imports.html -->
<module name="UnusedImports"/>
<module name="TreeWalker">

<!-- Block checks - http://checkstyle.sourceforge.net/config_blocks.html -->
<module name="LeftCurly">
<property name="option" value="eol"/>
<module name="SuppressionCommentFilter"/>
<module name="SuppressWarningsHolder"/>

<!-- Checks for Naming Conventions. -->
<!-- See http://checkstyle.sf.net/config_naming.html -->
<module name="ConstantName"/>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName"/>
<!--<module name="MethodName"/>-->
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="StaticVariableName"/>
<module name="TypeName"/>

<!-- Checks for imports -->
<!-- See http://checkstyle.sf.net/config_import.html -->
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
<property name="processJavadoc" value="false"/>
</module>
<module name="RightCurly">
<property name="option" value="same"/>
</module>
<module name="NeedBraces"/>

<!-- Checks for Size Violations. -->
<!-- See http://checkstyle.sf.net/config_sizes.html -->
<!-- Size checks - http://checkstyle.sourceforge.net/config_sizes.html -->
<module name="LineLengthCheck">
<property name="max" value="150"/>
<module name="LineLength">
<property name="max" value="120"/>
<property name="tabWidth" value="4"/>
<property name="ignorePattern" value="^import"/>
</module>

<!-- Metrics checks - http://checkstyle.sourceforge.net/config_metrics.html -->
<module name="JavaNCSS">
<property name="methodMaximum" value="70"/>
<property name="classMaximum" value="500"/>
</module>
<module name="CyclomaticComplexity">
<property name="max" value="15"/>
<module name="MethodLength"/>
<module name="ParameterNumber">
<property name="ignoreOverriddenMethods" value="true"/>
</module>
<!-- <module name="CyclomaticComplexity">-->
<!-- <property name="max" value="16"/>-->
<!-- </module>-->
<!--<module name="NPathComplexity">-->
<!--<property name="max" value="50"/>-->
<!--</module>-->

<!-- Coding checks http://checkstyle.sourceforge.net/config_coding.html -->
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="EmptyForIteratorPad"/>
<module name="GenericWhitespace"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter"/>
<module name="NoWhitespaceBefore"/>
<!--<module name="OperatorWrap"/>-->
<module name="ParenPad"/>
<module name="TypecastParenPad"/>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround"/>

<!-- Modifier Checks -->
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
<module name="ModifierOrder"/>
<module name="RedundantModifier"/>

<!-- Checks for blocks. You know, those {}'s -->
<!-- See http://checkstyle.sf.net/config_blocks.html -->
<module name="AvoidNestedBlocks"/>
<module name="EmptyBlock"/>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>

<!-- Checks for common coding problems -->
<!-- See http://checkstyle.sf.net/config_coding.html -->
<module name="EmptyStatement"/>
<module name="EqualsHashCode"/>
<!--<module name="HiddenField"/>-->
<module name="IllegalInstantiation"/>
<module name="InnerAssignment"/>
<module name="MissingSwitchDefault"/>
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>
<module name="StringLiteralEquality"/>
Expand All @@ -83,10 +127,32 @@
</module>
<module name="NoFinalizer"/>

</module>
<!-- Checks for class design -->
<!-- See http://checkstyle.sf.net/config_design.html -->
<!--<module name="DesignForExtension"/>-->
<!--<module name="FinalClass"/>-->
<module name="HideUtilityClassConstructor"/>
<module name="InterfaceIsType"/>
<module name="VisibilityModifier"/>

<!-- Miscellaneous other checks. -->
<!-- See http://checkstyle.sf.net/config_misc.html -->
<module name="ArrayTypeStyle"/>
<!--<module name="TodoComment"/>-->
<module name="UpperEll"/>

<!-- Metrics checks - http://checkstyle.sourceforge.net/config_metrics.html -->
<module name="JavaNCSS">
<property name="methodMaximum" value="60"/>
<property name="classMaximum" value="500"/>
</module>
<module name="CyclomaticComplexity">
<property name="max" value="10"/>
</module>
<module name="NPathComplexity">
<property name="max" value="50"/>
</module>

<module name="RegexpHeader">
<property name="headerFile" value="config/apache-copyright.header" />
<property name="fileExtensions" value="java, groovy" />
</module>
</module>

</module>
39 changes: 22 additions & 17 deletions gradle/dependencies.gradle
@@ -1,29 +1,30 @@
ext {
aptIdeaVersion = 0.17
byteBuddyVersion = "1.8.22"
cglib = "3.2.8"
byteBuddyVersion = "1.9.10"
cglib = "3.2.10"
classmate = "1.4.0"
classGraph = "4.1.7"
equalsverifierVersion = '2.5.2'
groovy = "2.5.0"
equalsverifierVersion = '3.1.5'
groovy = "2.5.4"
jacocoVersion = '0.8.1'
jackson = '2.9.6'
joda = "2.10"
jackson = '2.9.8'
joda = "2.10.1"
jsonPath = "2.4.0"
jsonAssert = "1.5.0"
mapstruct = "1.2.0.Final"
mockito = "2.22.0"
objenesis = "2.6"
mapstruct = "1.3.0.Final"
mockito = "2.24.5"
objenesis = "3.0.1"
oasCore = "2.0.0-rc1"
servlet = "3.1.0"
slf4j = "1.7.25"
snakeyaml = '1.23'
spock = "1.1-groovy-2.4"
spring = "5.0.9.RELEASE"
springHateoas = "0.24.0.RELEASE"
springDataRest = "3.0.10.RELEASE"
spock = "1.3-RC1-groovy-2.5"
spring = "5.1.5.RELEASE"
springIntegration = "5.1.3.RELEASE"
springHateoas = "0.25.1.RELEASE"
springDataRest = "3.1.5.RELEASE"
springPluginVersion = "1.2.0.RELEASE"
swagger2Core = "1.5.20"
springBoot = "2.0.5.RELEASE"
springBoot = "2.1.3.RELEASE"
springfoxRfc6570Version = "1.0.0"
undercouch = "3.4.3"
validationApiVersion = '2.0.1.Final'
Expand Down Expand Up @@ -61,6 +62,10 @@ ext {
"io.swagger:swagger-annotations:${swagger2Core}",
"io.swagger:swagger-models:${swagger2Core}"
],
oasCore : [
"io.swagger:swagger-annotations:${oasCore}",
"io.swagger:swagger-models:${oasCore}"
],
spring : [
"org.springframework.plugin:spring-plugin-core:${springPluginVersion}",
"org.springframework.plugin:spring-plugin-metadata:${springPluginVersion}",
Expand All @@ -83,8 +88,8 @@ ext {
"org.springframework:spring-context:$spring",
],
springProvidedWithSpringIntegration: [
"org.springframework.integration:spring-integration-http:$spring",
"org.springframework.integration:spring-integration-webflux:$spring",
"org.springframework.integration:spring-integration-http:$springIntegration",
"org.springframework.integration:spring-integration-webflux:$springIntegration",
],
springBootProvided : [
"org.springframework.boot:spring-boot-autoconfigure:$springBoot"
Expand Down
1 change: 1 addition & 0 deletions gradle/documentation.gradle
Expand Up @@ -14,6 +14,7 @@ gitPublish {
preserve {
include '**/*'
}

contents {
from "${buildDir}/all-docs"
}
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.

0 comments on commit c9f3fe0

Please sign in to comment.