diff --git a/.yo-rc.json b/.yo-rc.json index e014d9567..850b97768 100644 --- a/.yo-rc.json +++ b/.yo-rc.json @@ -15,6 +15,6 @@ "bintraySignFiles": true, "mavenCentralSync": true, "enableQualityChecks": true, - "usedGeneratorVersion": "1.1.4" + "usedGeneratorVersion": "2.0.0" } } \ No newline at end of file diff --git a/build-deps.gradle b/build-deps.gradle deleted file mode 100644 index c2f86ce9a..000000000 --- a/build-deps.gradle +++ /dev/null @@ -1,28 +0,0 @@ -repositories { - jcenter() - mavenCentral() - mavenLocal() -} - -ext { - dropwizard = '0.8.5' - guice = '4.0' -} - -dependencies { - provided 'junit:junit:4.12' - provided "io.dropwizard:dropwizard-testing:$dropwizard" - provided 'org.spockframework:spock-core:1.0-groovy-2.4' - provided 'com.google.code.findbugs:annotations:3.0.1' - - compile "com.google.inject.extensions:guice-servlet:$guice" - compile "com.google.inject.extensions:guice-multibindings:$guice" - compile "io.dropwizard:dropwizard-core:$dropwizard" - compile 'org.glassfish.hk2:guice-bridge:2.4.0-b31' - compile 'ru.vyarus:generics-resolver:2.0.0' - - testCompile "io.dropwizard:dropwizard-auth:$dropwizard" - testCompile 'cglib:cglib-nodep:3.1' - testCompile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2' - testCompile 'com.github.stefanbirkner:system-rules:1.9.0' -} \ No newline at end of file diff --git a/build.gradle b/build.gradle index 36667dd7d..4d416cac1 100644 --- a/build.gradle +++ b/build.gradle @@ -1,93 +1,113 @@ -buildscript { - apply from: "gradle/buildscript.gradle", to: buildscript +plugins { + id 'groovy' + id 'jacoco' + id 'project-report' + id 'ru.vyarus.java-lib' version '1.0.1' + id 'ru.vyarus.github-info' version '1.0.0' + id 'ru.vyarus.animalsniffer' version '1.0.0' + id 'ru.vyarus.quality' version '1.2.0' + id 'com.github.kt3k.coveralls' version '2.4.0x' + id 'com.jfrog.bintray' version '1.5' + id 'net.researchgate.release' version '2.3.4' + id 'com.github.ben-manes.versions' version '0.11.3' } -group = 'ru.vyarus' -description = 'Dropwizard guice integration' +sourceCompatibility = 1.7 +targetCompatibility = 1.7 -// convention: project.name == github project name == bintray package page -project.ext { - build = { - gradle = 2.8 - java = 1.7 - // if not empty runs animal sniffer on compile to guarantee binary compatibility; set '' to disable - signature = 'org.codehaus.mojo.signature:java17:+@signature' - strictQualityCheck = true // true to fail build on quality plugins warnings - } - github = { - user = 'xvik' - } - bintray = { - user = project.hasProperty('bintrayUser') ? bintrayUser : 'USER' // configured in ~/.gradle/gradle.properties - key = project.hasProperty('bintrayKey') ? bintrayKey : 'KEY' // configured in ~/.gradle/gradle.properties - repo = 'xvik' - tags = ['dropwizard', 'guice'] - dryRun = false // whether to run this as dry-run, without deploying (TEST RUN) - publish = true //If version should be auto published after an upload +wrapper { + gradleVersion = 2.10 +} - signFiles = true // true to gpg sign files on bintray (certificate must be installed on bintray account) - gpgPassphrase = project.hasProperty('gpgPassphrase') ? gpgPassphrase : '' // optionally configured in ~/.gradle/gradle.properties if certificate requires it +ext { + dropwizard = '0.8.5' + guice = '4.0' +} - mavenCentralSync = true // true to sync with maven central (files signing required) - ossUser = project.hasProperty('sonatypeUser') ? sonatypeUser : 'USER' // configured in ~/.gradle/gradle.properties - ossPassword = project.hasProperty('sonatypePassword') ? sonatypePassword : 'PASSWORD' // configured in ~/.gradle/gradle.properties - } +repositories { jcenter(); mavenCentral(); mavenLocal() } +dependencies { + signature 'org.codehaus.mojo.signature:java17:+@signature' + + provided 'junit:junit:4.12' + provided "io.dropwizard:dropwizard-testing:$dropwizard" + provided 'org.spockframework:spock-core:1.0-groovy-2.4' + provided 'com.google.code.findbugs:annotations:3.0.1' + + compile "com.google.inject.extensions:guice-servlet:$guice" + compile "com.google.inject.extensions:guice-multibindings:$guice" + compile "io.dropwizard:dropwizard-core:$dropwizard" + compile 'org.glassfish.hk2:guice-bridge:2.4.0-b31' + compile 'ru.vyarus:generics-resolver:2.0.1' + + testCompile "io.dropwizard:dropwizard-auth:$dropwizard" + testCompile 'cglib:cglib-nodep:3.1' + testCompile 'org.codehaus.groovy.modules.http-builder:http-builder:0.7.2' + testCompile 'com.github.stefanbirkner:system-rules:1.9.0' +} + +group = 'ru.vyarus' +description = 'Dropwizard guice integration' + +github { + user = 'xvik' license = 'MIT' - licenseDesc = 'The MIT License' - // extend pom for maven central acceptance - pomConfig = { - scm { - url github.scm - connection github.scmConnection - developerConnection github.scmConnection +} + +pom { + developers { + developer { + id "xvik" + name "Vyacheslav Rusakov" + email "vyarus@gmail.com" } - licenses { - license { - name licenseDesc - url github.licenseUrl - distribution "repo" + } +} + +bintray { + user = project.hasProperty('bintrayUser') ? bintrayUser : 'USER' + key = project.hasProperty('bintrayKey') ? bintrayKey : 'KEY' + publications = ['maven'] + dryRun = false + publish = true + pkg { + repo = 'xvik' + name = project.name + desc = project.description + labels = ['dropwizard', 'guice'] + publicDownloadNumbers = true + version { + gpg { + sign = true + passphrase = project.hasProperty('gpgPassphrase') ? gpgPassphrase : '' } - } - developers { - developer { - id "xvik" - name "Vyacheslav Rusakov" - email "vyarus@gmail.com" + mavenCentralSync { + sync = true + user = project.hasProperty('sonatypeUser') ? sonatypeUser : 'USER' + password = project.hasProperty('sonatypePassword') ? sonatypePassword : 'PASSWORD' } } } } -apply plugin: 'java' -apply plugin: 'groovy' -apply plugin: 'com.github.ben-manes.versions' -apply plugin: 'project-report' - -apply from: 'gradle/build.gradle' -apply from: 'gradle/github.gradle' -apply from: 'gradle/bintray.gradle' -apply from: 'gradle/release.gradle' -apply from: 'gradle/maven.gradle' -apply from: 'gradle/quality.gradle' +afterReleaseBuild { + dependsOn = [bintrayUpload] + doLast { + logger.warn "RELEASED $project.group:$project.name:$project.version" + } +} -apply from: 'build-deps.gradle' +test { + testLogging { + events "skipped", "failed", "standard_error" + exceptionFormat "full" + } + maxHeapSize = "512m" +} dependencyUpdates.revision = 'release' +jacocoTestReport.reports.xml.enabled = true task showDependenciesTree(dependsOn: 'htmlDependencyReport', group: 'help', description: 'Generates dependencies tree report and opens it in browser') << { java.awt.Desktop.getDesktop().open(file('/build/reports/project/dependencies/root.html')) } - -task install(dependsOn: 'publishMavenJavaPublicationToMavenLocal', group: 'publishing', - description: 'Install to local maven repository') << { - logger.warn "INSTALLED $project.group:$project.name:$project.version" -} - -/* -Tasks hint: - - dependencyUpdates: checks available dependencies updates - - dependencies: print dependencies tree in console - - check: run quality checks and tests - - release: release version -*/ diff --git a/gradle/bintray.gradle b/gradle/bintray.gradle deleted file mode 100644 index c1401befc..000000000 --- a/gradle/bintray.gradle +++ /dev/null @@ -1,35 +0,0 @@ -apply plugin: 'com.jfrog.bintray' - -// hack: without it bintray property is not visible (???!) -logger.debug("$project.ext.bintray") -def bintrayCfg = project.ext.bintray - -bintray { - user = bintrayCfg.user - key = bintrayCfg.key - publications = ['mavenJava'] // see publications closure - dryRun = bintrayCfg.dryRun - publish = bintrayCfg.publish - pkg { //package will be created if does not exist - repo = bintrayCfg.repo -// userOrg = 'myorg' // an optional organization name when the repo belongs to one of the user's orgs - name = project.name - desc = project.description - websiteUrl = github.site - issueTrackerUrl = github.tracker - vcsUrl = github.scm - licenses = [license] - labels = bintrayCfg.tags - version { - gpg { - sign = bintrayCfg.signFiles - passphrase = bintrayCfg.gpgPassphrase - } - mavenCentralSync { - sync = bintrayCfg.mavenCentralSync - user = bintrayCfg.ossUser - password = bintrayCfg.ossPassword - } - } - } -} \ No newline at end of file diff --git a/gradle/build.gradle b/gradle/build.gradle deleted file mode 100644 index 0de86ebab..000000000 --- a/gradle/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -// hack: without it build property is not visible (???!) -logger.debug("$project.ext.build") -def buildCfg = project.ext.build - -// compatibility required only for main classes - test don't need restrictions -compileJava { - sourceCompatibility = buildCfg.java - targetCompatibility = buildCfg.java -} - -// optional and provided scopes, but they must be supported manually (see pom rendering) -configurations { - provided - optional - compile.extendsFrom provided, optional -} - -boolean signatureSet = buildCfg.signature -if (signatureSet) { - apply plugin: 'be.insaneprogramming.gradle.animalsniffer' - - animalsniffer { - signature = buildCfg.signature - ignores = [] // list of packages to ignore - annotations = [] // supported annotations to signal Animal Sniffer to ignore annotated elements - excludeDependencies = true // only disable if you have signatures for all dependencies! - skip = false // skip animal sniffer tasks - runForTests = false // run animal sniffer for test classes as well - } -} - -task wrapper(type: Wrapper, group: 'build setup') { - gradleVersion = buildCfg.gradle -} \ No newline at end of file diff --git a/gradle/buildscript.gradle b/gradle/buildscript.gradle deleted file mode 100644 index 6af146859..000000000 --- a/gradle/buildscript.gradle +++ /dev/null @@ -1,16 +0,0 @@ -// external file maintains build classpath for all scripts -// (to overcome buildscipt gradle limitation and define all plugins in one place) -repositories { - jcenter() - mavenCentral() -} -dependencies { - // bintray upload - classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4" - // coveralls integration - classpath "org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0" - // check dependencies updates - classpath "com.github.ben-manes:gradle-versions-plugin:0.11.3" - classpath 'net.researchgate:gradle-release:2.3.0' - classpath "be.insaneprogramming.gradle:animalsniffer-gradle-plugin:1.4.0" -} \ No newline at end of file diff --git a/gradle/config/checkstyle/checkstyle-noframes-sorted.xsl b/gradle/config/checkstyle/checkstyle-noframes-sorted.xsl deleted file mode 100644 index da6a65161..000000000 --- a/gradle/config/checkstyle/checkstyle-noframes-sorted.xsl +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -

CheckStyle Audit

Designed for use with CheckStyle and Ant.
-
- - - -
- - - -
- - - - -
- - - - -
- - - - -

Files

- - - - - - - - - - - - - - - -
NameErrors
-
- - - - -

File

- - - - - - - - - - - - - - -
Error DescriptionLine
- Back to top -
- - - -

Summary

- - - - - - - - - - - - -
FilesErrors
-
- - - - a - b - - -
- - diff --git a/gradle/config/checkstyle/checkstyle.xml b/gradle/config/checkstyle/checkstyle.xml deleted file mode 100644 index a45d0e07d..000000000 --- a/gradle/config/checkstyle/checkstyle.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/gradle/config/findbugs/exclude.xml b/gradle/config/findbugs/exclude.xml deleted file mode 100644 index 5d72336cd..000000000 --- a/gradle/config/findbugs/exclude.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/gradle/config/findbugs/plain.xsl b/gradle/config/findbugs/plain.xsl deleted file mode 100644 index 80fff8d7b..000000000 --- a/gradle/config/findbugs/plain.xsl +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - - Warning - Priority - Details - - - - - - - FindBugs Report - - - - - - - -

FindBugs Report

-

Produced using FindBugs .

-

Project: - - - - -

-

Metrics

- - -

Summary

- - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - - - - - - tablerow0 - tablerow1 - - - - - - -
Warning TypeNumber
Warnings
Total
-



- -

Warnings

- -

Click on each warning link to see a full description of the issue, and - details of how to resolve it.

- - - - - - - - - Warnings - Warnings_ - - - -



-

Warning Types

- - - - - - - - -
- - - - - - - - - - - High - Medium - Low - Unknown - - - -



- - - -
In file , - - - line - - - lines - to - - -
- - -
-
-

- - -
- - -

- -



-
- - - - - - -

- - - - - - - - - - - - - - -

None

-



-
- - - - - -

lines of code analyzed, - in classes, - in packages.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
MetricTotalDensity*
High Priority Warnings - - - - - - - - -
Medium Priority Warnings - - - - - - - - -
Low Priority Warnings - - - - - - - - -
Total Warnings - - - - - - - - - - -
-

(* Defects per Thousand lines of non-commenting source statements)

-



- -
- -
diff --git a/gradle/config/pmd/pmd.xml b/gradle/config/pmd/pmd.xml deleted file mode 100644 index 4f69fbacf..000000000 --- a/gradle/config/pmd/pmd.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - Based on Juan Roperto's ruleset (https://github.com/jroperto) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/gradle/github.gradle b/gradle/github.gradle deleted file mode 100644 index 4ed227aa4..000000000 --- a/gradle/github.gradle +++ /dev/null @@ -1,20 +0,0 @@ -// hack: without it github property is not visible (???!) -logger.debug("$project.ext.github") - -// generate additional properties -github.site = "https://github.com/$github.user/$project.name" -github.tracker = "https://github.com/$github.user/$project.name/issues" -github.scm = "https://github.com/$github.user/${project.name}.git" -github.scmConnection = "scm:git:git://github.com/$github.user/${project.name}.git" -github.licenseUrl = "https://raw.githubusercontent.com/$github.user/${project.name}/master/LICENSE" - -apply plugin: 'jacoco' -apply plugin: 'com.github.kt3k.coveralls' - -// jococo report send to coveralls by travis -jacocoTestReport { - reports { - xml.enabled = true // coveralls plugin depends on xml format report - html.enabled = true - } -} \ No newline at end of file diff --git a/gradle/maven.gradle b/gradle/maven.gradle deleted file mode 100644 index c1cee7f7f..000000000 --- a/gradle/maven.gradle +++ /dev/null @@ -1,68 +0,0 @@ -apply plugin: 'maven-publish' - -publishing { - publications { - mavenJava(MavenPublication) { - if (plugins.hasPlugin('war')) { - from components.web - } else { - from components.java - } - - artifact sourcesJar - artifact javadocJar - - pom.withXml { - // gradle sets runtime scope for all dependencies.. fixing - asNode().dependencies.'*'.findAll() { - it.scope.text() == 'runtime' && project.configurations.compile.allDependencies.find { dep -> - dep.name == it.artifactId.text() - } - }.each() { - it.scope*.value = 'compile' - } - - asNode().dependencies.'*'.findAll() { - project.configurations.optional.allDependencies.find { dep -> - dep.name == it.artifactId.text() - } - }.each() { - it.scope*.value = 'compile' - it.appendNode('optional', 'true') - } - - asNode().dependencies.'*'.findAll() { - project.configurations.provided.allDependencies.find { dep -> - dep.name == it.artifactId.text() - } - }.each() { - it.scope*.value = 'provided' - } - - def root = asNode() - root.appendNode('name', project.name) - root.appendNode('description', project.description) - root.appendNode('url', github.site) - root.children().last() + pomConfig - - asNode().scm[0].appendNode('tag', project.version.replaceAll('-SNAPSHOT', '')) - } - } - } -} - - -task sourcesJar(type: Jar, dependsOn: classes, group: 'build') { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn: javadoc, group: 'build') { - classifier = 'javadoc' - from javadoc.destinationDir -} - -artifacts { - archives sourcesJar - archives javadocJar -} \ No newline at end of file diff --git a/gradle/quality.gradle b/gradle/quality.gradle deleted file mode 100644 index 05cd7a9b1..000000000 --- a/gradle/quality.gradle +++ /dev/null @@ -1,166 +0,0 @@ -/* Quality plugins checks applied during "gradle check" execution, so travis build will fail in case of quality problems - * and its better to call check manually before push. */ - -// hack: without it build property is not visible (???!) -logger.debug("$project.ext.build") -boolean ignoreFailuresCfg = !project.ext.build.strictQualityCheck - -// enable detailed warnings (all options http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javac.html#BHCJCABJ) -compileJava.options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked" - -apply plugin: 'findbugs' - -// findbugs 3 supports java 8, but requires java 7! -// if you need java 6 support use 2.0.3 version -findbugs { - toolVersion = "3.0.1" - ignoreFailures = ignoreFailuresCfg - sourceSets = [sourceSets.main] - effort = "max" - reportLevel = "medium" - excludeFilter = file("gradle/config/findbugs/exclude.xml") -} - -// extended xml report is required to build pretty console output (also, can't generate both xml and html report) -findbugsMain.reports { - xml { - enabled true - withMessages true - } -} - -findbugsTest.reports { - xml { - enabled true - withMessages true - } -} - -gradle.taskGraph.afterTask { Task task, TaskState state -> - if ((task.name == 'findbugsMain' || task.name == 'findbugsTest')) { - def findbugsType = task.name == 'findbugsMain' ? 'main' : 'test' - - // print findbugs errors - def outFile = findbugsType + '.xml' - def reportFile = file("${buildDir}/reports/findbugs/${outFile}") - - if (reportFile.exists()) { - def result = new XmlParser().parse(reportFile) - - def desc = [:] - result.BugPattern.each { pattern -> - desc[pattern.'@type'] = ' ' + pattern.Details[0].text() - //remove html tags - .replaceAll("<(.|\n)*?>", '') - // remove empty lines after tags remove (only one separator lne remain) - .replaceAll("( *\n){3,}", '\n\n') - // reduce left indents - .replaceAll(" {2,}", ' ') - // indent all not indented lines - .replaceAll("\n([^ ])", '\n $1').trim() - } - def cat = [:] - result.BugCategory.each { category -> - cat[category.'@category'] = category.Description[0].text() - } - result.BugInstance.each { bug -> - println '' - def msg = bug.LongMessage[0] - def src = bug.SourceLine[0] - logger.error "[${cat[bug.'@category']}] ${src.'@sourcepath'}:${src.'@start'}:${src.'@end'} ${msg.text()} [${bug.'@type'}]\n${desc[bug.'@type']}" - } - if (result.BugInstance.size() > 0) - println '' - } - - if (file("$buildDir/reports/findbugs/${findbugsType}.xml").exists()) { - def htmlReportPath = "$buildDir/reports/findbugs/${findbugsType}.html" - ant.xslt(in: "$buildDir/reports/findbugs/${findbugsType}.xml", - style: "gradle/config/findbugs/plain.xsl", - out: htmlReportPath - ) - if (state.failure) { - logger.error("Findbugs HTML report: file:///${file(htmlReportPath).canonicalPath.replaceAll("\\\\", "/")}") - } - } - } -} - - -apply plugin: 'pmd' - -pmd { - toolVersion = "5.4.0" - ignoreFailures = ignoreFailuresCfg - ruleSetFiles = files("gradle/config/pmd/pmd.xml") - sourceSets = [sourceSets.main] -} - -gradle.taskGraph.afterTask { Task task, TaskState state -> - if ((task.name == 'pmdMain' || task.name == 'pmdTest')) { - // print pmd errors - def outFile = task.name == 'pmdMain' ? 'main.xml' : 'test.xml' - def reportFile = file("${buildDir}/reports/pmd/${outFile}") - - if (reportFile.exists()) { - def result = new XmlParser().parse(reportFile) - - result.file.each { file -> - if (file.violation.size() >0) - println '' - file.violation.each { violation -> - logger.error "${file.'@name'}:${violation.'@beginline'}:${violation.'@endline'} ${violation.text()}${violation.'@externalInfoUrl'}\n" - } - } - } - } -} - - -apply plugin: 'checkstyle' - -// Note: checkstyle 6.2 requires jdk7 or above. For jdk6 use older version (6.1.1) -checkstyle { - toolVersion = "6.11.2" - ignoreFailures = ignoreFailuresCfg - sourceSets = [sourceSets.main] - configFile = file('gradle/config/checkstyle/checkstyle.xml') -} - -def checkType; -task checkstyleReport << { - def report = "$buildDir/reports/checkstyle/${checkType}.xml" - if (file(report).exists()) { - def hasErrors = new XmlParser().parse(file(report)).find{ file -> file.error} - if (hasErrors) { - def htmlReportPath = "$buildDir/reports/checkstyle/${checkType}.html" - ant.xslt(in: report, - style: "gradle/config/checkstyle/checkstyle-noframes-sorted.xsl", - out: htmlReportPath - ) - logger.error("Checkstyle HTML report: file:///${file(htmlReportPath).canonicalPath.replaceAll("\\\\", "/")}") - } - } -} - -gradle.taskGraph.afterTask { Task task, TaskState state -> - if (task.name in ['checkstyleMain', 'checkstyleTest']) { - checkstyleReport { - def matcher = task.name =~ /^checkstyle(.*)$/ - if (matcher.matches()) { - checkType = matcher.group(1).toLowerCase() - } - } - checkstyleReport.execute() - } -} - -// configure tests to show additional info in logs -// important for travis build to quickly see failure cause -// see http://www.gradle.org/docs/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:testLogging -test { - testLogging { - events "skipped", "failed", "standardError" - exceptionFormat "full" - } -} \ No newline at end of file diff --git a/gradle/release.gradle b/gradle/release.gradle deleted file mode 100644 index 40fa9aba7..000000000 --- a/gradle/release.gradle +++ /dev/null @@ -1,28 +0,0 @@ -// release plugin fails if git repository not found, so we have to simply not register it until git repo will be available -if (file("$project.rootDir/.git").exists()) { - apply plugin: 'net.researchgate.release' - -// confirmReleaseVersion will remove the -SNAPSHOT, but the jar task are already configured with the SNAPSHOT name - confirmReleaseVersion << { - publishing.publications.mavenJava.version = project.version - jar.version = project.version - javadocJar.version = project.version - sourcesJar.version = project.version - publishing.publications.mavenJava.setArtifacts([jar, sourcesJar, javadocJar]) - - // reset bintray versions - if (bintrayUpload.versionName.contains('SNAPSHOT')) { - bintrayUpload.versionName = project.version - } - if (bintrayUpload.versionVcsTag.contains('SNAPSHOT')) { - bintrayUpload.versionVcsTag = project.version - } - } - - afterReleaseBuild.dependsOn bintrayUpload - afterReleaseBuild.doLast { - logger.warn "RELEASED $project.group:$project.name:$project.version" - } -} else { - logger.warn("Git repository not initialized, release plugin disabled"); -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index fd7e590e5..941144813 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5075ae216..8ff61d813 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Oct 20 22:56:21 NOVT 2015 +#Sun Dec 27 17:50:00 NOVT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip diff --git a/gradlew b/gradlew index 91a7e269e..9d82f7891 100755 --- a/gradlew +++ b/gradlew @@ -42,11 +42,6 @@ case "`uname`" in ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do fi done SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- +cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" -cd "$SAVED" >&- +cd "$SAVED" >/dev/null CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar @@ -114,6 +109,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/src/main/java/ru/vyarus/dropwizard/guice/GuiceBundle.java b/src/main/java/ru/vyarus/dropwizard/guice/GuiceBundle.java index 93b27696d..0c92a74e9 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/GuiceBundle.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/GuiceBundle.java @@ -72,7 +72,7 @@ * @author Vyacheslav Rusakov * @since 31.08.2014 */ -@SuppressWarnings("PMD.ExcessiveClassLength") +@SuppressWarnings("PMD.ExcessiveImports") public final class GuiceBundle implements ConfiguredBundle { private final Logger logger = LoggerFactory.getLogger(GuiceBundle.class); diff --git a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/jersey/provider/ProviderReporter.java b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/jersey/provider/ProviderReporter.java index 6f96ef841..71a975989 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/jersey/provider/ProviderReporter.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/jersey/provider/ProviderReporter.java @@ -112,7 +112,7 @@ private void reportGroup(final String title, final Collection items) { /** * Extension point descriptor. */ - @SuppressWarnings({"checkstyle:visibilitymodifier", "PMD.AbstractClassWithoutAnyMethod"}) + @SuppressWarnings("checkstyle:VisibilityModifier") private static class ExtDescriptor { public String name; public String format; diff --git a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/plugin/PluginInstaller.java b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/plugin/PluginInstaller.java index 7fc3fc3be..d3af565d9 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/plugin/PluginInstaller.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/feature/plugin/PluginInstaller.java @@ -56,7 +56,6 @@ public void install(final Binder binder, final Class type, fina } } - @SuppressWarnings("PMD.UnusedPrivateMethod") private void registerNamedPlugin(final Binder binder, final Class pluginType, final Class keyType, final Class plugin, final K key) { MapBinder.newMapBinder(binder, keyType, pluginType).addBinding(key).to(plugin); diff --git a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/internal/FeaturesHolder.java b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/internal/FeaturesHolder.java index 4ff38e249..8320ee571 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/internal/FeaturesHolder.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/internal/FeaturesHolder.java @@ -68,7 +68,6 @@ public List> getFeatures(final Class instal * Installer must implement {@link ru.vyarus.dropwizard.guice.module.installer.order.Ordered} otherwise * no order appear. */ - @SuppressWarnings("PMD.UseCollectionIsEmpty") public void order() { final OrderComparator comparator = new OrderComparator(); for (Class installer : installerTypes) { diff --git a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/scanner/ClasspathScanner.java b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/scanner/ClasspathScanner.java index 795974005..950fad37f 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/scanner/ClasspathScanner.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/scanner/ClasspathScanner.java @@ -30,7 +30,7 @@ public ClasspathScanner(final Set packages) { */ public void scan(final ClassVisitor visitor) { for (String pkg : packages) { - List> found; + final List> found; try { found = OReflectionHelper.getClassesFor(pkg, Thread.currentThread().getContextClassLoader()); } catch (ClassNotFoundException e) { diff --git a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/JerseyBinding.java b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/JerseyBinding.java index 32ce2df0c..347724878 100644 --- a/src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/JerseyBinding.java +++ b/src/main/java/ru/vyarus/dropwizard/guice/module/installer/util/JerseyBinding.java @@ -24,7 +24,6 @@ * @author Vyacheslav Rusakov * @since 21.11.2014 */ -@SuppressWarnings("PMD.AvoidDuplicateLiterals") public final class JerseyBinding { private JerseyBinding() {