From b8c23ad0d17cca4f8a16ba76913dcef60ca0f8c9 Mon Sep 17 00:00:00 2001 From: Markus KARG Date: Thu, 8 Aug 2024 11:54:56 +0000 Subject: [PATCH] Sunsetting jCenter / Bintray --- build.gradle.kts | 25 ------------- gradle/publishing-jcenter.gradle | 63 -------------------------------- gradle/publishing.gradle | 2 - kobalt/src/Build.kt | 6 --- 4 files changed, 96 deletions(-) delete mode 100644 gradle/publishing-jcenter.gradle diff --git a/build.gradle.kts b/build.gradle.kts index 8aefce282..6eab446b8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,7 +33,6 @@ val kotlinVer by extra { kotlinVersion } buildscript { repositories { - jcenter() mavenCentral() maven { setUrl("https://plugins.gradle.org/m2") } } @@ -45,7 +44,6 @@ java { } repositories { - jcenter() mavenCentral() maven { setUrl("https://plugins.gradle.org/m2") } } @@ -55,7 +53,6 @@ plugins { `java-library` `maven-publish` signing - id("com.jfrog.bintray") version "1.8.3" // Don't use 1.8.4, crash when publishing id("biz.aQute.bnd.builder") version "5.1.2" } @@ -86,7 +83,6 @@ tasks.withType { // // Releases: -// ./gradlew bintrayUpload (to JCenter) // ./gradlew publish (to Sonatype, then go to https://s01.oss.sonatype.org/index.html#stagingRepositories to publish) // Make sure that ~/.gradle/gradle.properties: // signing.keyId=XXXXXXXX @@ -96,27 +92,6 @@ tasks.withType { // (gpg --list-keys, last eight digits of the key) // -bintray { - user = project.findProperty("bintrayUser")?.toString() - key = project.findProperty("bintrayApiKey")?.toString() - dryRun = false - publish = false - - setPublications("custom") - - with(pkg) { - repo = "maven" - name = This.artifactId - with(version) { - name = This.version - desc = This.description - with(gpg) { - sign = true - } - } - } -} - val sourcesJar by tasks.creating(Jar::class) { group = JavaBasePlugin.DOCUMENTATION_GROUP description = "Assembles sources JAR" diff --git a/gradle/publishing-jcenter.gradle b/gradle/publishing-jcenter.gradle deleted file mode 100644 index 0ce8f95b7..000000000 --- a/gradle/publishing-jcenter.gradle +++ /dev/null @@ -1,63 +0,0 @@ -// -// Artifactory -// ./gradlew artifactoryPublish (upload snapshot to jfrog) -// ./gradlew bintrayUpload (upload release to JCenter) -// - -Properties properties = new Properties() -try { - properties.load(project.rootProject.file('local.properties').newDataInputStream()) -} catch (FileNotFoundException ignore) {} - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - publications = ['mavenCustom'] - pkg { - repo = 'maven' - name = project.name - desc = 'Testing framework for Java' - licenses = ['Apache-2.0'] - labels = ['testng'] - - version { - name = project.version //Bintray logical version name - gpg { - // Without this, .asc files don't get generated - sign = true - } - - } - } -} - -artifactory { - def a_user = hasProperty('artifactory_user') ? artifactory_user : System.getenv('artifactory_user') - def a_password = hasProperty('artifactory_password') ? artifactory_password : System.getenv('artifactory_password') - def a_contextUrl = hasProperty('artifactory_contextUrl') ? artifactory_password : System.getenv('artifactory_contextUrl') - - contextUrl = "${a_contextUrl}" - //The base Artifactory URL if not overridden by the publisher/resolver - publish { - repository { - repoKey = 'oss-snapshot-local' - username = a_user - password = a_password - maven = true - - } - defaults { - publications('mavenCustom') - } - - } - resolve { - repository { - repoKey = 'libs-snapshot' - username = a_user - password = a_password - maven = true - - } - } -} diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 993662744..ac95f6246 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -42,7 +42,6 @@ artifacts { buildscript { repositories { - jcenter() } dependencies { @@ -52,5 +51,4 @@ buildscript { } apply from: 'gradle/publishing-maven.gradle' -apply from: 'gradle/publishing-jcenter.gradle' diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 2b8a11d99..8cb96b659 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -2,7 +2,6 @@ import com.beust.kobalt.plugin.java.javaCompiler import com.beust.kobalt.plugin.osgi.osgi import com.beust.kobalt.plugin.packaging.assemble -import com.beust.kobalt.plugin.publish.bintray import com.beust.kobalt.project import org.apache.maven.model.Developer import org.apache.maven.model.License @@ -26,11 +25,6 @@ val jcommander = project { } } - bintray { - publish = true - sign = true - } - javaCompiler { args("-target", "1.8", "-source", "1.8", "-g", "-encoding", "utf-8") }