1
1
plugins {
2
2
id ' java'
3
- id ' com.jfrog.bintray' version ' 1.8.5'
4
3
id ' org.jetbrains.kotlin.jvm' version ' 1.4.0'
5
- id " com.github.dcendents.android-maven" version " 2.1"
4
+ id ' maven-publish'
5
+ id ' signing'
6
6
}
7
7
8
- group ' com.stringcare'
9
- version ' 4.0.1'
10
-
11
8
def siteUrl = ' https://github.com/StringCare/KotlinGradlePlugin'
12
9
def gitUrl = ' https://github.com/StringCare/KotlinGradlePlugin.git'
13
10
14
11
sourceCompatibility = 1.8
15
12
16
13
repositories {
17
14
google()
18
- jcenter()
19
15
mavenCentral()
20
16
}
21
17
@@ -35,51 +31,59 @@ compileTestKotlin {
35
31
kotlinOptions. jvmTarget = " 1.8"
36
32
}
37
33
38
- install {
39
- repositories. mavenInstaller {
40
- pom {
41
- project {
42
- packaging ' aar'
43
- name ' StringCareAndroidPlugin'
44
- url siteUrl
45
- // Set your license
34
+ group = " io.github.stringcare"
35
+ version = " 4.2.1"
36
+
37
+ Properties properties = new Properties ()
38
+ properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
39
+
40
+ publishing {
41
+ publications {
42
+ plugin(MavenPublication ) {
43
+ from components. java
44
+ artifactId = " plugin"
45
+ pom {
46
+ packaging = ' aar'
47
+ name = ' StringCareAndroidPlugin'
48
+ description = " Stringcare Android library"
49
+ url = siteUrl
50
+ scm {
51
+ connection = gitUrl
52
+ developerConnection = gitUrl
53
+ url = siteUrl
54
+ }
46
55
licenses {
47
56
license {
48
- name ' The Apache Software License, Version 2.0'
49
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
57
+ name = ' The Apache License, Version 2.0'
58
+ url = ' http://www.apache.org/licenses/LICENSE-2.0.txt'
50
59
}
51
60
}
52
61
developers {
53
62
developer {
54
- id ' efraespada'
55
- name ' efraespada'
56
- email ' efraespada@gmail.com'
63
+ id = ' efraespada'
64
+ name = ' efraespada'
65
+ email = ' efraespada@gmail.com'
57
66
}
58
67
}
59
- scm {
60
- connection gitUrl
61
- developerConnection gitUrl
62
- url siteUrl
63
- }
68
+ }
69
+ }
70
+ }
71
+ repositories {
72
+ maven {
73
+ // def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
74
+ // def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
75
+ url = " https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
76
+ credentials {
77
+ username = properties[" nexusUsername" ]
78
+ password = properties[" nexusPassword" ]
64
79
}
65
80
}
66
81
}
67
82
}
68
83
69
- Properties properties = new Properties ()
70
- properties. load(project. rootProject. file(' local.properties' ). newDataInputStream())
71
- bintray {
72
- user = properties. getProperty(" bintrayUser" )
73
- key = properties. getProperty(" bintrayApiKey" )
74
- configurations = [' archives' ]
75
- pkg {
76
- repo = " maven"
77
- name = " StringCareAndroidPlugin"
78
- websiteUrl = siteUrl
79
- vcsUrl = gitUrl
80
- licenses = [" Apache-2.0" ]
81
- publish = true
82
- }
84
+ signing {
85
+ useGpgCmd()
86
+ sign publishing. publications. plugin
83
87
}
84
88
85
89
processResources {
0 commit comments