Skip to content
Permalink
Browse files

Added support for Gradle 5.3.

  • Loading branch information...
Jean-Philippe Gariépy Jean-Philippe Gariépy
Jean-Philippe Gariépy authored and Jean-Philippe Gariépy committed Mar 28, 2019
1 parent 9d10523 commit bf4cecc570d0a49e6262ae356a5b916fa2c955e5
@@ -10,15 +10,22 @@ configure(javaProjects) {
apply plugin: 'eclipse'
apply plugin: 'checkstyle'

dependencies { checkstyle 'com.puppycrawl.tools:checkstyle:5.5' }
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:5.5'
}

checkstyle.configFile = rootProject.file('checkstyle/checkstyle.xml')
sourceCompatibility = '1.6'
targetCompatibility = '1.6'

// Fix for Unable to get class information
checkstyleMain { classpath += configurations.compile }
checkstyleTest { classpath += configurations.compile }
checkstyleMain {
classpath += configurations.compile
}

checkstyleTest {
classpath += configurations.compile
}

eclipse {
project {
@@ -48,9 +55,8 @@ configure(javaProjects) {
artifacts {
archives javadocJar
archives sourcesJar
archives jar
}

artifacts { archives jar }
}

subprojects {
@@ -62,25 +68,31 @@ subprojects {
group = rootProject.group
version = rootProject.version

repositories { mavenCentral() }
repositories {
mavenCentral()
}

signing {
required { gradle.taskGraph.hasTask("uploadArchives") } // Only sign during release.
required {
gradle.taskGraph.hasTask("uploadArchives") // Only sign during release.
}
sign configurations.archives
}

uploadArchives {
repositories {
mavenDeployer(name: 'mavenCentral') {
mavenDeployer {
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
// Add credentials only if they are present in the project.
// Avoid build failure if not trying to release and user doesn't have proper credentials.
if(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')){
if(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) {
authentication(userName: sonatypeUsername, password: sonatypePassword)
}
}

beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}

// All these are required for maven central release.
// See https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-6.CentralSyncRequirement
@@ -117,10 +129,12 @@ subprojects {
}

configure(javaProjects) {
uploadArchives{
uploadArchives {
repositories {
mavenCentral{
pom.project{ packaging 'jar' }
mavenDeployer {
pom.project {
packaging 'jar'
}
}
}
}
@@ -135,9 +149,14 @@ task prepareJavadoc(type: Copy) {

task globalJavadoc(type: Javadoc, dependsOn: prepareJavadoc ) {

source javaProjects.collect {project -> project.sourceSets.main.allJava }
source javaProjects.collect {
project -> project.sourceSets.main.allJava
}

destinationDir = new java.io.File(buildDir, 'javadoc')
classpath = files(javaProjects.collect {project -> project.sourceSets.main.compileClasspath})
classpath = files(javaProjects.collect {
project -> project.sourceSets.main.compileClasspath}
)

// To use Java 7 Javadoc:
// gradlew -DjavadocExecutable=/opt/java/java-7/bin/javadoc globalJavadoc
@@ -165,10 +184,6 @@ task globalJavadoc(type: Javadoc, dependsOn: prepareJavadoc ) {
}
}

wrapper {
gradleVersion '4.10.2'
}

void createVersionFile(File resourceDir, String fileName) {
File versionFile = new File(resourceDir, fileName)
versionFile.getParentFile().mkdirs()
@@ -177,4 +192,4 @@ void createVersionFile(File resourceDir, String fileName) {
writer.write(version)
writer.write("\n")
writer.close()
}
}
BIN -987 Bytes (98%) gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
@@ -26,7 +26,7 @@ artifacts {

uploadArchives {
repositories {
mavenCentral {
mavenDeployer {
pom.project { packaging 'war' }
}
}

0 comments on commit bf4cecc

Please sign in to comment.
You can’t perform that action at this time.