diff --git a/build.gradle b/build.gradle index 03438ebf..8ff3ea65 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ buildscript { repositories { mavenCentral() maven { - url "https://releases.jfrog.io/artifactory/oss-releases" + url = "https://releases.jfrog.io/artifactory/oss-releases" } } dependencies { @@ -10,15 +10,11 @@ buildscript { } } -plugins { - id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' -} - allprojects { repositories { mavenCentral() maven { - url "https://releases.jfrog.io/artifactory/oss-releases" + url = "https://releases.jfrog.io/artifactory/oss-releases" } } @@ -30,8 +26,8 @@ allprojects { version = currentVersion status = version.endsWith('-SNAPSHOT') ? 'integration' : 'release' - project.tasks.withType(Jar).each { - it.version = currentVersion + tasks.withType(Jar).configureEach { + version = currentVersion } } @@ -45,23 +41,14 @@ artifactory { } } -nexusPublishing { - repositories { - sonatype { - nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) - snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) - username = System.getenv("MAVEN_USERNAME") - password = System.getenv("MAVEN_PASSWORD") - } - } -} - subprojects { apply plugin: 'java-library' apply plugin: 'signing' - sourceCompatibility = 1.8 - targetCompatibility = 1.8 + java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } // Force secure versions to fix vulnerabilities configurations.all { @@ -91,12 +78,14 @@ subprojects { api 'org.jfrog.buildinfo:build-info-api:2.43.9' } - task sourcesJar(type: Jar, dependsOn: classes) { + tasks.register('sourcesJar', Jar) { + dependsOn classes archiveClassifier.set('sources') from sourceSets.main.allSource } - task javadocJar(type: Jar, dependsOn: javadoc) { + tasks.register('javadocJar', Jar) { + dependsOn javadoc archiveClassifier.set('javadoc') from javadoc.destinationDir } @@ -104,9 +93,9 @@ subprojects { test { useTestNG() testLogging { - exceptionFormat "full" + exceptionFormat = "full" events "started", "passed", "skipped", "failed", "standardOut", "standardError" - minGranularity 0 + minGranularity = 0 } ignoreFailures = System.getenv("IGNORE_FAILURES") ? System.getenv("IGNORE_FAILURES").toBoolean() : false } diff --git a/gradle.properties b/gradle.properties index dd3620d6..549d507e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -currentVersion=2.22.0 +currentVersion=2.23.0-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index c7d437bb..9bf7bd33 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/services/src/main/resources/artifactory.client.release.properties b/services/src/main/resources/artifactory.client.release.properties index 6ed6a3cf..d5c1c3bc 100644 --- a/services/src/main/resources/artifactory.client.release.properties +++ b/services/src/main/resources/artifactory.client.release.properties @@ -1 +1 @@ -version=2.22.0-SNAPSHOT \ No newline at end of file +version=2.23.0-SNAPSHOT \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 93647276..3db6ba3d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,15 @@ +plugins { + id 'com.gradleup.nmcp.settings' version '1.6.1' +} + +nmcpSettings { + centralPortal { + username = System.getenv("MAVEN_USERNAME") + password = System.getenv("MAVEN_PASSWORD") + publishingType = "USER_MANAGED" + } +} + String rootName = 'artifactory-java-client' String api = 'api' String services = 'services'