build.gradle.kts: added snapshot publishing to oss.jfrog.org

This commit is contained in:
Karl Tauber
2020-02-05 12:34:07 +01:00
parent 030e1809f3
commit 9d046ecd1d
4 changed files with 71 additions and 2 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
version = "0.26" version = "0.26.1-SNAPSHOT"
allprojects { allprojects {
repositories { repositories {

View File

@@ -20,6 +20,7 @@ plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id( "com.jfrog.bintray" ) version "1.8.4" id( "com.jfrog.bintray" ) version "1.8.4"
id( "com.jfrog.artifactory" ) version "4.13.0"
} }
if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) { if( JavaVersion.current() >= JavaVersion.VERSION_1_9 ) {
@@ -53,7 +54,7 @@ tasks {
targetCompatibility = "9" targetCompatibility = "9"
} }
} }
jar { jar {
archiveBaseName.set( "flatlaf" ) archiveBaseName.set( "flatlaf" )
@@ -146,3 +147,25 @@ bintray {
publish = true publish = true
} }
} }
artifactory {
setContextUrl( "https://oss.jfrog.org" )
publish( closureOf<org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig> {
repository( delegateClosureOf<groovy.lang.GroovyObject> {
setProperty( "repoKey", "oss-snapshot-local" )
setProperty( "username", System.getenv( "BINTRAY_USER" ) ?: System.getProperty( "bintray.user" ) )
setProperty( "password", System.getenv( "BINTRAY_KEY" ) ?: System.getProperty( "bintray.key" ) )
} )
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" )
} )
}

View File

@@ -20,6 +20,7 @@ plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id( "com.jfrog.bintray" ) version "1.8.4" id( "com.jfrog.bintray" ) version "1.8.4"
id( "com.jfrog.artifactory" ) version "4.13.0"
} }
dependencies { dependencies {
@@ -119,3 +120,25 @@ bintray {
publish = true publish = true
} }
} }
artifactory {
setContextUrl( "https://oss.jfrog.org" )
publish( closureOf<org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig> {
repository( delegateClosureOf<groovy.lang.GroovyObject> {
setProperty( "repoKey", "oss-snapshot-local" )
setProperty( "username", System.getenv( "BINTRAY_USER" ) ?: System.getProperty( "bintray.user" ) )
setProperty( "password", System.getenv( "BINTRAY_KEY" ) ?: System.getProperty( "bintray.key" ) )
} )
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" )
} )
}

View File

@@ -20,6 +20,7 @@ plugins {
`java-library` `java-library`
`maven-publish` `maven-publish`
id( "com.jfrog.bintray" ) version "1.8.4" id( "com.jfrog.bintray" ) version "1.8.4"
id( "com.jfrog.artifactory" ) version "4.13.0"
} }
dependencies { dependencies {
@@ -119,3 +120,25 @@ bintray {
publish = true publish = true
} }
} }
artifactory {
setContextUrl( "https://oss.jfrog.org" )
publish( closureOf<org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig> {
repository( delegateClosureOf<groovy.lang.GroovyObject> {
setProperty( "repoKey", "oss-snapshot-local" )
setProperty( "username", System.getenv( "BINTRAY_USER" ) ?: System.getProperty( "bintray.user" ) )
setProperty( "password", System.getenv( "BINTRAY_KEY" ) ?: System.getProperty( "bintray.key" ) )
} )
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" )
} )
}