2020-11-07 14:23:06 +01:00
|
|
|
apply plugin: 'maven-publish'
|
2020-03-10 07:21:51 +01:00
|
|
|
|
2020-11-07 14:23:06 +01:00
|
|
|
afterEvaluate {
|
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
release(MavenPublication) {
|
|
|
|
groupId = groupName
|
|
|
|
artifactId = 'tunnel'
|
|
|
|
version wireguardVersionName
|
2020-03-10 07:21:51 +01:00
|
|
|
|
2020-11-07 14:23:06 +01:00
|
|
|
artifact sourcesJar
|
|
|
|
artifact javadocJar
|
2020-03-10 07:21:51 +01:00
|
|
|
|
2020-11-07 14:23:06 +01:00
|
|
|
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/'
|
|
|
|
}
|
|
|
|
}
|
2020-03-10 07:21:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-11-07 14:23:06 +01:00
|
|
|
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')
|
|
|
|
}
|
|
|
|
}
|
2020-03-10 07:21:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-03-11 07:28:37 +01:00
|
|
|
android.libraryVariants.all { variant ->
|
|
|
|
if (variant.name == 'release') {
|
|
|
|
task javadoc(type: Javadoc) {
|
2020-03-14 06:14:52 +01:00
|
|
|
source = variant.javaCompileProvider.get().source
|
2020-03-11 07:28:37 +01:00
|
|
|
classpath = files((android.bootClasspath.join(File.pathSeparator)))
|
2020-03-14 06:14:52 +01:00
|
|
|
classpath += variant.javaCompileProvider.get().classpath
|
2020-03-11 07:28:37 +01:00
|
|
|
title = 'Embeddable WireGuard Tunnel for Android v$wireguardVersionName'
|
|
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
|
|
archiveClassifier = 'javadoc'
|
|
|
|
from javadoc.destinationDir
|
|
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
archiveClassifier = 'sources'
|
|
|
|
from android.sourceSets.main.java.srcDirs
|
|
|
|
}
|
|
|
|
}
|
2020-03-10 07:21:51 +01:00
|
|
|
}
|