diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2020-11-07 18:53:06 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2020-11-07 18:53:06 +0530 |
commit | 35f868733c38fd007d9f0ea6daa02998e34bd706 (patch) | |
tree | 83f900d285a89007dd5f3deca3cf53b10fc38998 /tunnel/publish.gradle | |
parent | e71b3d258313448b86d60def49c97d5fffd50964 (diff) |
build: switch to Gradle's maven-publish plugin
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Diffstat (limited to 'tunnel/publish.gradle')
-rw-r--r-- | tunnel/publish.gradle | 92 |
1 files changed, 44 insertions, 48 deletions
diff --git a/tunnel/publish.gradle b/tunnel/publish.gradle index 63e7d0cf..7124da64 100644 --- a/tunnel/publish.gradle +++ b/tunnel/publish.gradle @@ -1,53 +1,53 @@ -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' +apply plugin: 'maven-publish' -install { - repositories.mavenInstaller { - pom.project { - name 'WireGuard Tunnel Library' - description 'Embeddable tunnel library for WireGuard for Android' - url 'https://www.wireguard.com/' +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + groupId = groupName + artifactId = 'tunnel' + version wireguardVersionName - packaging 'aar' - groupId groupName - artifactId 'tunnel' - version wireguardVersionName + artifact sourcesJar + artifact javadocJar - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' + from components.getByName("release") + + pom { + name = 'WireGuard Tunnel Library' + description = 'Embeddable tunnel library for WireGuard for Android' + url = 'https://www.wireguard.com/' + + licenses { + license { + name = 'The Apache Software License, Version 2.0' + url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution = 'repo' + } + } + scm { + connection = 'scm:git:https://git.zx2c4.com/wireguard-android' + developerConnection = 'scm:git:https://git.zx2c4.com/wireguard-android' + url = 'https://git.zx2c4.com/wireguard-android' + } + developers { + organization { + name = 'WireGuard' + url = 'https://www.wireguard.com/' + } + } } } - scm { - connection 'scm:git:https://git.zx2c4.com/wireguard-android' - url 'https://git.zx2c4.com/wireguard-android' - } - organization { - name 'WireGuard' - url 'https://www.wireguard.com/' - } } - } -} - -bintray { - user = hasProperty('BINTRAY_USER') ? getProperty('BINTRAY_USER') : System.getenv('BINTRAY_USER') - key = hasProperty('BINTRAY_KEY') ? getProperty('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') - - configurations = [ 'archives' ] - - pkg { - repo = 'wireguard-android' - name = 'wireguard-android' - userOrg = 'wireguard' - licenses = [ 'Apache-2.0' ] - vcsUrl = 'https://git.zx2c4.com/wireguard-android' - publish = true - - version { - name = wireguardVersionName + repositories { + maven { + name = "bintray" + url = uri("https://api.bintray.com/maven/wireguard/wireguard-android/wireguard-android/;publish=1;override=0") + credentials { + username = hasProperty('BINTRAY_USER') ? getProperty('BINTRAY_USER') : System.getenv('BINTRAY_USER') + password = hasProperty('BINTRAY_KEY') ? getProperty('BINTRAY_KEY') : System.getenv('BINTRAY_KEY') + } + } } } } @@ -68,9 +68,5 @@ android.libraryVariants.all { variant -> archiveClassifier = 'sources' from android.sourceSets.main.java.srcDirs } - artifacts { - archives sourcesJar - archives javadocJar - } } } |