From b384456138590295c84b1311192d30a59921967e Mon Sep 17 00:00:00 2001 From: Adrian Kelly Date: Thu, 9 Apr 2015 17:01:03 +1000 Subject: [PATCH] Added staticdocs module - Removed a bunch of gradle apply language plugins - Reverted gralde idea copyright generation from copyright file --- build.gradle | 3 +- gradle/coverage.gradle | 4 +++ gradle/idea.gradle | 5 +-- settings.gradle | 1 + springfox-core/build.gradle | 3 -- springfox-petstore/build.gradle | 2 -- springfox-schema/build.gradle | 4 --- springfox-spi/build.gradle | 3 -- springfox-staticdocs/build.gradle | 19 ++++++++++++ .../java/springfox/staticdocs/Sample.java | 27 ++++++++++++++++ .../src/main/resources/.gitkeep | 0 .../springfox/staticdocs/SampleTest.groovy | 31 +++++++++++++++++++ .../src/test/resources/.gitkeep | 0 13 files changed, 87 insertions(+), 15 deletions(-) create mode 100644 springfox-staticdocs/build.gradle create mode 100644 springfox-staticdocs/src/main/java/springfox/staticdocs/Sample.java create mode 100644 springfox-staticdocs/src/main/resources/.gitkeep create mode 100644 springfox-staticdocs/src/test/groovy/springfox/staticdocs/SampleTest.groovy create mode 100644 springfox-staticdocs/src/test/resources/.gitkeep diff --git a/build.gradle b/build.gradle index 1a238d5c871..153d7e7c6e5 100644 --- a/build.gradle +++ b/build.gradle @@ -37,8 +37,9 @@ SoftwareVersion currentVersion = BuildscriptVersionResolver.projectVersion(proje version = currentVersion configure(publishable(subprojects)) { subproject -> - apply plugin: 'groovy' apply plugin: "com.ofg.uptodate" + //Not strictly groovy projects but useful for the IDE to recognise groovy test sources + apply plugin: 'groovy' //gradle groovy plugin extends the java plugin ext { jdkVersion = 1.6 diff --git a/gradle/coverage.gradle b/gradle/coverage.gradle index 46e9e07eaf4..7e51e33830f 100644 --- a/gradle/coverage.gradle +++ b/gradle/coverage.gradle @@ -30,6 +30,10 @@ jacocoTestReport { def results = parser.parse(report) def percentage = { + if (null == it) { + //if it does not exist assume 100% + return 100 + } def covered = it.'@covered' as Double def missed = it.'@missed' as Double ((covered / (covered + missed)) * 100).round(2) diff --git a/gradle/idea.gradle b/gradle/idea.gradle index f59fa9b8d26..ca86aa81f58 100644 --- a/gradle/idea.gradle +++ b/gradle/idea.gradle @@ -18,15 +18,16 @@ idea { def javacSettings = node.appendNode('component', [name: 'JavacSettings']) javacSettings.appendNode('option', [name: 'MAXIMUM_HEAP_SIZE', value: "256"]) + // license header def copyrightManager = node.component.find { it.'@name' == 'CopyrightManager' } copyrightManager.@default = "ASL2" def aslCopyright = copyrightManager.copyright.find { it.option.find { it.@name == "myName" }?.@value == "ASL2" } - def copyRightFile = file("$rootDir/config/apache-copyright.header") + if (aslCopyright == null) { copyrightManager.append(new XmlParser().parseText(""" -