diff --git a/_ext/eclipse-base/build.gradle b/_ext/eclipse-base/build.gradle index 2e6b8bbd9e..6d98470d71 100644 --- a/_ext/eclipse-base/build.gradle +++ b/_ext/eclipse-base/build.gradle @@ -15,7 +15,7 @@ dependencies { } compile("org.slf4j:slf4j-api:${VER_SLF4J}") - testCompile("org.slf4j:slf4j-simple:${VER_SLF4J}") + testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") } jar { diff --git a/_ext/eclipse-cdt/build.gradle b/_ext/eclipse-cdt/build.gradle index a8943e321c..278cf039c3 100644 --- a/_ext/eclipse-cdt/build.gradle +++ b/_ext/eclipse-cdt/build.gradle @@ -26,7 +26,7 @@ dependencies { // Required to by CCorePlugin calling PositionTrackerManager compile "org.eclipse.platform:org.eclipse.core.filebuffers:${VER_ECLISPE_PLATFORM}" - testCompile("org.slf4j:slf4j-simple:${VER_SLF4J}") + testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") } diff --git a/_ext/eclipse-groovy/build.gradle b/_ext/eclipse-groovy/build.gradle index 29e577df01..53dc0895f3 100644 --- a/_ext/eclipse-groovy/build.gradle +++ b/_ext/eclipse-groovy/build.gradle @@ -37,7 +37,7 @@ dependencies { compile ("org.eclipse.platform:org.eclipse.jface.text:${VER_ECLISPE_JFACE}") { exclude group: 'org.eclipse.platform', module: 'org.eclipse.swt' } - testCompile("org.slf4j:slf4j-simple:${VER_SLF4J}") + testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") } ////////// diff --git a/_ext/eclipse-wtp/build.gradle b/_ext/eclipse-wtp/build.gradle index 15356178de..aed6173ddb 100644 --- a/_ext/eclipse-wtp/build.gradle +++ b/_ext/eclipse-wtp/build.gradle @@ -73,7 +73,7 @@ dependencies { // Required by org.eclipse.wst.xsd.core compile "org.eclipse.xsd:org.eclipse.xsd:${VER_ECLISPE_XSD}" - testCompile("org.slf4j:slf4j-simple:${VER_SLF4J}") + testImplementation("org.slf4j:slf4j-simple:${VER_SLF4J}") } jar { diff --git a/_ext/gradle/java-setup.gradle b/_ext/gradle/java-setup.gradle index 96a56e3d50..6d8bd31873 100644 --- a/_ext/gradle/java-setup.gradle +++ b/_ext/gradle/java-setup.gradle @@ -73,6 +73,6 @@ dependencies { compileOnly 'com.google.code.findbugs:annotations:3.0.0' compileOnly 'com.google.code.findbugs:jsr305:3.0.0' - testCompile 'junit:junit:4.12' - testCompile 'org.assertj:assertj-core:3.5.2' + testImplementation 'junit:junit:4.12' + testImplementation 'org.assertj:assertj-core:3.5.2' } diff --git a/build.gradle b/build.gradle index 355e5e94cd..ed2a25d57b 100644 --- a/build.gradle +++ b/build.gradle @@ -8,9 +8,10 @@ buildscript { classpath "com.diffplug.gradle:goomph:${VER_GOOMPH}" classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${VER_BINTRAY}" classpath "com.gradle.publish:plugin-publish-plugin:${VER_PLUGIN_PUBLISH}" - classpath "org.ajoberstar:gradle-git:${VER_GRADLE_GIT}" + classpath "org.ajoberstar:gradle-git-publish:${VER_GRADLE_GIT}" classpath "ch.raffael.pegdown-doclet:pegdown-doclet:${VER_PEGDOWN_DOCLET}" classpath "gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:${VER_SPOTBUGS_PLUGIN}" + classpath "com.google.guava:guava:27.1-jre" // Force newer version for spotbugs classpath "com.gradle:build-scan-plugin:${VER_BUILDSCAN_PLUGIN}" } } diff --git a/gradle.properties b/gradle.properties index 0d81c6417c..adb4ce5805 100644 --- a/gradle.properties +++ b/gradle.properties @@ -22,13 +22,13 @@ artifactIdGradle=spotless-plugin-gradle # Build requirements VER_JAVA=1.8 VER_SPOTBUGS=3.1.6 -VER_SPOTBUGS_PLUGIN=1.6.2 +VER_SPOTBUGS_PLUGIN=2.0.0 VER_BINTRAY=1.7.3 VER_PLUGIN_PUBLISH=0.9.7 VER_GOOMPH=3.17.4 -VER_GRADLE_GIT=1.7.2 +VER_GRADLE_GIT=2.1.1 VER_PEGDOWN_DOCLET=1.3 -VER_BUILDSCAN_PLUGIN=1.16 +VER_BUILDSCAN_PLUGIN=2.0.2 # Used in multiple places VER_DURIAN=1.2.0 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 99340b4ad1..f6b961fd5a 100755 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 ea720f986f..430dfabc5c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-bin.zip diff --git a/javadoc-publish/build.gradle b/javadoc-publish/build.gradle index a6de1f2698..f9ad84e02c 100644 --- a/javadoc-publish/build.gradle +++ b/javadoc-publish/build.gradle @@ -1,27 +1,18 @@ -def cred = { - if (System.env[it] != null) { - return System.env[it] - } else if (project.hasProperty(it)) { - return project[it] - } else { - return 'unknown_' + it - } -} - -apply plugin: 'org.ajoberstar.github-pages' -githubPages { +// https://github.com/ajoberstar/gradle-git-publish +apply plugin: 'org.ajoberstar.git-publish' +gitPublish { repoUri = 'https://github.com/diffplug/spotless' - deleteExistingFiles = false - pages { + branch = 'gh-pages' + preserve { include '**/*' } + contents { from 'build/javadoc/' into 'javadoc/' } - credentials { - username = cred('gh_token') - password = '' - } + + // Credentials + // GRGIT_USER environment variable or org.ajoberstar.grgit.auth.username system property. } -tasks.prepareGhPages.dependsOn(":lib:javadoc") -tasks.prepareGhPages.dependsOn(":lib-extra:javadoc") -tasks.prepareGhPages.dependsOn(":plugin-gradle:javadoc") -tasks.prepareGhPages.dependsOn(":plugin-maven:javadoc") +tasks.gitPublishCopy.dependsOn(":lib:javadoc") +tasks.gitPublishCopy.dependsOn(":lib-extra:javadoc") +tasks.gitPublishCopy.dependsOn(":plugin-gradle:javadoc") +tasks.gitPublishCopy.dependsOn(":plugin-maven:javadoc") diff --git a/lib-extra/build.gradle b/lib-extra/build.gradle index 83833c6e1a..19613e9664 100644 --- a/lib-extra/build.gradle +++ b/lib-extra/build.gradle @@ -15,10 +15,10 @@ dependencies { compile "org.codehaus.groovy:groovy-xml:2.4.7" // testing - testCompile project(':testlib') - testCompile "junit:junit:${VER_JUNIT}" - testCompile "org.assertj:assertj-core:${VER_ASSERTJ}" - testCompile "com.diffplug.durian:durian-testlib:${VER_DURIAN}" + testImplementation project(':testlib') + testImplementation "junit:junit:${VER_JUNIT}" + testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" + testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}" } // we'll hold the core lib to a high standard diff --git a/lib/build.gradle b/lib/build.gradle index 16eb81f30b..0ba9572698 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -6,9 +6,9 @@ apply from: rootProject.file('gradle/java-publish.gradle') dependencies { // zero runtime reqs is a hard requirements for spotless-lib // if you need a dep, put it in lib-extra - testCompile "junit:junit:${VER_JUNIT}" - testCompile "org.assertj:assertj-core:${VER_ASSERTJ}" - testCompile "com.diffplug.durian:durian-testlib:${VER_DURIAN}" + testImplementation "junit:junit:${VER_JUNIT}" + testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" + testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}" } // we'll hold the core lib to a high standard diff --git a/plugin-gradle/build.gradle b/plugin-gradle/build.gradle index 1f94ecda91..bcfead05a0 100644 --- a/plugin-gradle/build.gradle +++ b/plugin-gradle/build.gradle @@ -18,10 +18,10 @@ dependencies { compile "com.diffplug.durian:durian-core:${VER_DURIAN}" compile "com.diffplug.durian:durian-io:${VER_DURIAN}" - testCompile project(':testlib') - testCompile "junit:junit:${VER_JUNIT}" - testCompile "org.assertj:assertj-core:${VER_ASSERTJ}" - testCompile "com.diffplug.durian:durian-testlib:${VER_DURIAN}" + testImplementation project(':testlib') + testImplementation "junit:junit:${VER_JUNIT}" + testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" + testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}" } tasks.eclipse.dependsOn(pluginUnderTestMetadata) diff --git a/plugin-maven/build.gradle b/plugin-maven/build.gradle index 6141140996..3fe4e792f2 100644 --- a/plugin-maven/build.gradle +++ b/plugin-maven/build.gradle @@ -3,7 +3,7 @@ buildscript { dependencies { classpath "com.github.spullara.mustache.java:compiler:${VER_MUSTACHE}" } } plugins { - id 'cz.malohlava' version '1.0.3' // https://github.com/mmalohlava/gradle-visteg + id 'cz.malohlava.visteg' version '1.0.5' // https://github.com/mmalohlava/gradle-visteg } // to generate taskGraph.pdf @@ -72,15 +72,15 @@ dependencies { compileOnly "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}" compileOnly "org.eclipse.aether:aether-util:${VER_ECLIPSE_AETHER}" - testCompile project(":testlib") - testCompile "junit:junit:${VER_JUNIT}" - testCompile "org.assertj:assertj-core:${VER_ASSERTJ}" - testCompile "org.mockito:mockito-core:${VER_MOCKITO}" - testCompile "com.diffplug.durian:durian-testlib:${VER_DURIAN}" - testCompile "com.github.spullara.mustache.java:compiler:${VER_MUSTACHE}" - testCompile "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}" - testCompile "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}" - testCompile "org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}" + testImplementation project(":testlib") + testImplementation "junit:junit:${VER_JUNIT}" + testImplementation "org.assertj:assertj-core:${VER_ASSERTJ}" + testImplementation "org.mockito:mockito-core:${VER_MOCKITO}" + testImplementation "com.diffplug.durian:durian-testlib:${VER_DURIAN}" + testImplementation "com.github.spullara.mustache.java:compiler:${VER_MUSTACHE}" + testImplementation "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}" + testImplementation "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}" + testImplementation "org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}" } task cleanMavenProjectDir(type: Delete) { delete MAVEN_PROJECT_DIR } @@ -173,7 +173,7 @@ task runMavenBuild(type: Exec, dependsOn: [ commandLine mvnw("clean install -B -Dmaven.repo.local=${LOCAL_MAVEN_REPO_DIR}") } -jar.deleteAllActions() +jar.setActions Arrays.asList() jar.dependsOn(runMavenBuild) jar.doLast { Files.copy( diff --git a/testlib/build.gradle b/testlib/build.gradle index 752d26f0eb..8ba99b1d25 100644 --- a/testlib/build.gradle +++ b/testlib/build.gradle @@ -7,6 +7,7 @@ dependencies { compile "com.diffplug.durian:durian-core:${VER_DURIAN}" compile "com.diffplug.durian:durian-io:${VER_DURIAN}" compile "com.diffplug.durian:durian-testlib:${VER_DURIAN}" + compile "com.diffplug.durian:durian-collect:${VER_DURIAN}" compile "junit:junit:${VER_JUNIT}" compile "org.assertj:assertj-core:${VER_ASSERTJ}" compile gradleTestKit()