11plugins {
22 id ' java'
3- id ' com.jfrog.bintray' version ' 1.8.5'
43 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'
66}
77
8- group ' com.stringcare'
9- version ' 4.0.1'
10-
118def siteUrl = ' https://github.com/StringCare/KotlinGradlePlugin'
129def gitUrl = ' https://github.com/StringCare/KotlinGradlePlugin.git'
1310
1411sourceCompatibility = 1.8
1512
1613repositories {
1714 google()
18- jcenter()
1915 mavenCentral()
2016}
2117
@@ -35,51 +31,59 @@ compileTestKotlin {
3531 kotlinOptions. jvmTarget = " 1.8"
3632}
3733
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+ }
4655 licenses {
4756 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'
5059 }
5160 }
5261 developers {
5362 developer {
54- id ' efraespada'
55- name ' efraespada'
56- email ' efraespada@gmail.com'
63+ id = ' efraespada'
64+ name = ' efraespada'
65+ email = ' efraespada@gmail.com'
5766 }
5867 }
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" ]
6479 }
6580 }
6681 }
6782}
6883
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
8387}
8488
8589processResources {
0 commit comments