bintay -> sonatype

This commit is contained in:
Volker Berlin 2021-03-20 21:18:56 +01:00
parent 4e375e2f0e
commit acd8a4ca9d

View File

@ -1,16 +1,15 @@
plugins { plugins {
id 'com.github.kt3k.coveralls' version '2.8.2' // Coverage id 'java-library'
id "com.jfrog.bintray" version "1.8.4" id 'maven-publish'
id 'signing'
id 'com.github.kt3k.coveralls' version '2.11.0' // Coverage
} }
apply plugin: 'java-library'
apply plugin: 'maven-publish'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
group 'de.inetsoftware' group 'de.inetsoftware'
archivesBaseName = 'jwebassembly-compiler' archivesBaseName = 'jwebassembly-compiler'
version = '0.3' version = '0.4'
repositories { repositories {
mavenCentral() mavenCentral()
@ -51,14 +50,16 @@ sourceSets {
} }
compileJava.options.encoding = 'UTF-8' compileJava.options.encoding = 'UTF-8'
compileJava.options.compilerArgs << '-Xlint:all' compileJava.options.compilerArgs += ['-Xlint:all', '-Xlint:-serial', '-Xlint:-fallthrough']
compileTestJava.options.encoding = 'UTF-8' compileTestJava.options.encoding = 'UTF-8'
compileTestJava.options.compilerArgs << '-Xlint:all'
javadoc.options.encoding = 'UTF-8' javadoc.options.encoding = 'UTF-8'
jar { jar {
manifest { manifest {
attributes( 'Implementation-Title': 'JWebAssembly-API', attributes( 'Specification-Title': 'JWebAssembly-Compiler',
'Specification-Vendor': 'i-net software',
'Specification-Version': version,
'Implementation-Title': 'JWebAssembly-Compiler',
'Implementation-Vendor': 'i-net software', 'Implementation-Vendor': 'i-net software',
'Implementation-Version': version) 'Implementation-Version': version)
} }
@ -109,51 +110,62 @@ jacocoTestReport {
} }
check.dependsOn tasks.coveralls check.dependsOn tasks.coveralls
bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['JWebAssemblyPublication']
publish = true
override = true
pkg {
repo = 'OSS'
userOrg = 'i-net-software'
licenses = ['Apache-2.0']
vcsUrl = 'https://github.com/i-net-software'
name = group + '.' + archivesBaseName
version {
released = new Date()
}
}
}
/****************************************
* Deploy to Sonatype
****************************************/
publishing { publishing {
publications { publications {
JWebAssemblyPublication(MavenPublication) { JWebAssembly(MavenPublication) {
from components.java from components.java
artifact sourcesJar artifact sourcesJar
artifact javadocJar artifact javadocJar
artifactId archivesBaseName artifactId archivesBaseName
pom.withXml { pom {
def root = asNode() name = 'JWebAssembly-Compiler'
root.appendNode('name', 'JWebAssembly-Compiler') description = 'A Java to WebAssembly compiler.'
root.appendNode('description', 'A Java to WebAssembly compiler.') url = 'https://github.com/i-net-software/JWebAssembly'
root.appendNode('url', 'https://github.com/i-net-software/JWebAssembly') developers {
developer {
def node = root.appendNode('developers').appendNode( 'developer' ) id = 'Horcrux7'
node.appendNode( 'id', 'Horcrux7' ) name = 'Volker Berlin'
node.appendNode( 'name', 'Volker Berlin' ) email = 'vberlin@inetsoftware.de'
node.appendNode( 'email', 'vberlin@inetsoftware.de' ) organization = 'i-net software'
node.appendNode( 'organization', 'i-net software' ) organizationUrl = 'https://www.inetsoftware.de'
node.appendNode( 'organizationUrl', 'https://www.inetsoftware.de' ) }
}
node = root.appendNode('scm') licenses {
node.appendNode( 'connection', 'scm:git:git@github.com:i-net-software/JWebAssembly.git' ) license {
node.appendNode( 'developerConnection', 'scm:git:git@github.com:i-net-software/JWebAssembly.git' ) name = 'The Apache License, Version 2.0'
node.appendNode( 'url', 'https://github.com/i-net-software/JWebAssembly' ) url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
root.children().last() }
scm {
connection = 'scm:git:git@github.com:i-net-software/JWebAssembly.git'
developerConnection = 'scm:git:git@github.com:i-net-software/JWebAssembly.git'
url = 'https://github.com/i-net-software/JWebAssembly'
}
}
}
}
repositories {
maven {
url 'https://oss.sonatype.org/service/local/staging/deploy/maven2'
if (project.hasProperty("ossrhUsername") ) {
credentials {
username ossrhUsername
password ossrhPassword
}
} }
} }
} }
} }
signing {
if (project.hasProperty("signing.keyId") ){
sign publishing.publications.JWebAssembly
// does not create sha256 and sha512 checksums
System.setProperty('org.gradle.internal.publish.checksums.insecure', 'true' )
}
}