1
- apply plugin : ' com.github.dcendents.android-maven'
2
- apply plugin : ' com.jfrog.bintray'
1
+ apply plugin : ' maven-publish'
3
2
4
- install {
5
- repositories. mavenInstaller {
6
- pom. project {
7
- name ' WireGuard Tunnel Library'
8
- description ' Embeddable tunnel library for WireGuard for Android'
9
- url ' https://www.wireguard.com/'
3
+ afterEvaluate {
4
+ publishing {
5
+ publications {
6
+ release(MavenPublication ) {
7
+ groupId = groupName
8
+ artifactId = ' tunnel'
9
+ version wireguardVersionName
10
10
11
- packaging ' aar'
12
- groupId groupName
13
- artifactId ' tunnel'
14
- version wireguardVersionName
11
+ artifact sourcesJar
12
+ artifact javadocJar
15
13
16
- licenses {
17
- license {
18
- name ' The Apache Software License, Version 2.0'
19
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
20
- distribution ' repo'
14
+ from components. getByName(" release" )
15
+
16
+ pom {
17
+ name = ' WireGuard Tunnel Library'
18
+ description = ' Embeddable tunnel library for WireGuard for Android'
19
+ url = ' https://www.wireguard.com/'
20
+
21
+ licenses {
22
+ license {
23
+ name = ' The Apache Software License, Version 2.0'
24
+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
25
+ distribution = ' repo'
26
+ }
27
+ }
28
+ scm {
29
+ connection = ' scm:git:https://git.zx2c4.com/wireguard-android'
30
+ developerConnection = ' scm:git:https://git.zx2c4.com/wireguard-android'
31
+ url = ' https://git.zx2c4.com/wireguard-android'
32
+ }
33
+ developers {
34
+ organization {
35
+ name = ' WireGuard'
36
+ url = ' https://www.wireguard.com/'
37
+ }
38
+ }
21
39
}
22
40
}
23
- scm {
24
- connection ' scm:git:https://git.zx2c4.com/wireguard-android'
25
- url ' https://git.zx2c4.com/wireguard-android'
26
- }
27
- organization {
28
- name ' WireGuard'
29
- url ' https://www.wireguard.com/'
30
- }
31
41
}
32
- }
33
- }
34
-
35
- bintray {
36
- user = hasProperty(' BINTRAY_USER' ) ? getProperty(' BINTRAY_USER' ) : System . getenv(' BINTRAY_USER' )
37
- key = hasProperty(' BINTRAY_KEY' ) ? getProperty(' BINTRAY_KEY' ) : System . getenv(' BINTRAY_KEY' )
38
-
39
- configurations = [ ' archives' ]
40
-
41
- pkg {
42
- repo = ' wireguard-android'
43
- name = ' wireguard-android'
44
- userOrg = ' wireguard'
45
- licenses = [ ' Apache-2.0' ]
46
- vcsUrl = ' https://git.zx2c4.com/wireguard-android'
47
- publish = true
48
-
49
- version {
50
- name = wireguardVersionName
42
+ repositories {
43
+ maven {
44
+ name = " bintray"
45
+ url = uri(" https://api.bintray.com/maven/wireguard/wireguard-android/wireguard-android/;publish=1;override=0" )
46
+ credentials {
47
+ username = hasProperty(' BINTRAY_USER' ) ? getProperty(' BINTRAY_USER' ) : System . getenv(' BINTRAY_USER' )
48
+ password = hasProperty(' BINTRAY_KEY' ) ? getProperty(' BINTRAY_KEY' ) : System . getenv(' BINTRAY_KEY' )
49
+ }
50
+ }
51
51
}
52
52
}
53
53
}
@@ -68,9 +68,5 @@ android.libraryVariants.all { variant ->
68
68
archiveClassifier = ' sources'
69
69
from android. sourceSets. main. java. srcDirs
70
70
}
71
- artifacts {
72
- archives sourcesJar
73
- archives javadocJar
74
- }
75
71
}
76
72
}
0 commit comments