mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
dropped usage of bintray, jcenter and jfrog artifactory
deploy to Sonatype OSSRH snapshots are now here: https://oss.sonatype.org/content/repositories/snapshots/com/formdev/
This commit is contained in:
@@ -20,15 +20,5 @@ plugins {
|
||||
|
||||
// required for kotlin-dsl or embedded-kotlin plugins
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// NOTE: keep plugin versions in sync with settings.gradle.kts
|
||||
|
||||
// "com.jfrog.bintray" plugin
|
||||
implementation( "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4" )
|
||||
|
||||
// "com.jfrog.artifactory" plugin
|
||||
implementation( "org.jfrog.buildinfo:build-info-extractor-gradle:4.13.0" )
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -26,8 +26,7 @@ val extension = project.extensions.create<PublishExtension>( "flatlafPublish" )
|
||||
|
||||
plugins {
|
||||
`maven-publish`
|
||||
id( "com.jfrog.bintray" )
|
||||
id( "com.jfrog.artifactory" )
|
||||
signing
|
||||
}
|
||||
|
||||
publishing {
|
||||
@@ -74,49 +73,40 @@ publishing {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bintray {
|
||||
user = rootProject.extra["bintray.user"] as String?
|
||||
key = rootProject.extra["bintray.key"] as String?
|
||||
repositories {
|
||||
maven {
|
||||
name = "OSSRH"
|
||||
|
||||
setPublications( "maven" )
|
||||
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
|
||||
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
|
||||
url = uri( if( java.lang.Boolean.getBoolean( "release" ) ) releasesRepoUrl else snapshotsRepoUrl )
|
||||
|
||||
with( pkg ) {
|
||||
repo = "flatlaf"
|
||||
afterEvaluate {
|
||||
this@with.name = extension.artifactId
|
||||
credentials {
|
||||
// get from gradle.properties
|
||||
val ossrhUsername: String? by project
|
||||
val ossrhPassword: String? by project
|
||||
|
||||
username = System.getenv( "OSSRH_USERNAME" ) ?: ossrhUsername
|
||||
password = System.getenv( "OSSRH_PASSWORD" ) ?: ossrhPassword
|
||||
}
|
||||
}
|
||||
setLicenses( "Apache-2.0" )
|
||||
vcsUrl = "https://github.com/JFormDesigner/FlatLaf"
|
||||
|
||||
with( version ) {
|
||||
name = project.version.toString()
|
||||
}
|
||||
|
||||
publish = rootProject.extra["bintray.publish"] as Boolean
|
||||
dryRun = rootProject.extra["bintray.dryRun"] as Boolean
|
||||
}
|
||||
}
|
||||
|
||||
artifactory {
|
||||
setContextUrl( "https://oss.jfrog.org" )
|
||||
signing {
|
||||
// get from gradle.properties
|
||||
val signingKey: String? by project
|
||||
val signingPassword: String? by project
|
||||
|
||||
publish( closureOf<org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig> {
|
||||
repository( delegateClosureOf<groovy.lang.GroovyObject> {
|
||||
setProperty( "repoKey", "oss-snapshot-local" )
|
||||
setProperty( "username", rootProject.extra["bintray.user"] as String? )
|
||||
setProperty( "password", rootProject.extra["bintray.key"] as String? )
|
||||
} )
|
||||
val key = System.getenv( "SIGNING_KEY" ) ?: signingKey
|
||||
val password = System.getenv( "SIGNING_PASSWORD" ) ?: signingPassword
|
||||
|
||||
defaults( delegateClosureOf<groovy.lang.GroovyObject> {
|
||||
invokeMethod( "publications", "maven" )
|
||||
setProperty( "publishArtifacts", true )
|
||||
setProperty( "publishPom", true )
|
||||
} )
|
||||
} )
|
||||
|
||||
resolve( delegateClosureOf<org.jfrog.gradle.plugin.artifactory.dsl.ResolverConfig> {
|
||||
setProperty( "repoKey", "jcenter" )
|
||||
} )
|
||||
useInMemoryPgpKeys( key, password )
|
||||
sign( publishing.publications["maven"] )
|
||||
}
|
||||
|
||||
// disable signing of snapshots
|
||||
tasks.withType<Sign>().configureEach {
|
||||
onlyIf { java.lang.Boolean.getBoolean( "release" ) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user