22
33buildscript {
44 repositories {
5+ apply plugin : ' maven-publish'
56 if (rootProject. ext. publishToMavenLocal) {
6- apply plugin : ' maven-publish'
77 mavenLocal()
88 }
9+ else
10+ {
11+ mavenCentral()
12+ }
913 }
1014}
1115
2327}
2428
2529archivesBaseName= " AndroidMySQLConnector"
26- version ' 0.49 '
30+ version ' 0.52 '
2731group ' com.BoardiesITSolutions'
2832
2933
@@ -47,43 +51,51 @@ android {
4751 }
4852
4953 println (" Is publishToMavenLocal set? " + rootProject. ext. publishToMavenLocal)
50- if (rootProject. ext. publishToMavenLocal) {
51- android. libraryVariants
54+ android. libraryVariants
5255
53- project. afterEvaluate {
54- project. publishing {
55- publications {
56- mavenJava(MavenPublication ) {
57- groupId ' com.BoardiesITSolutions'
58- artifactId ' AndroidMySQLConnector'
59- version ' 0.49'
60- artifact(" $buildDir /outputs/aar/AndroidMySQLConnector-release.aar" )
61- }
56+ project. afterEvaluate {
57+ project. publishing {
58+ publications {
59+ mavenJava(MavenPublication ) {
60+ groupId ' com.BoardiesITSolutions'
61+ artifactId ' AndroidMySQLConnector'
62+ version ' 0.51'
63+ artifact(" $buildDir /outputs/aar/AndroidMySQLConnector-release.aar" )
6264 }
63- repositories {
65+ }
66+ repositories {
67+ if (rootProject. ext. publishToMavenLocal) {
6468 mavenLocal()
6569 }
70+ else {
71+ mavenCentral()
72+ }
6673 }
6774 }
75+ }
6876
69- libraryVariants. all { variant ->
70- variant. outputs. all { output ->
71- def outputFile = output. outputFile
72- if (outputFile != null && outputFile. name. endsWith(' .aar' )) {
73- def fileName = " ${ archivesBaseName} -${ version} .aar"
74- // def fileName = "${archivesBaseName}-debug.aar"
75- // output.outputFile = new File(outputFile.parent, fileName)
76- outputFileName = fileName
77- }
77+ libraryVariants. all { variant ->
78+ variant. outputs. all { output ->
79+ def outputFile = output. outputFile
80+ if (outputFile != null && outputFile. name. endsWith(' .aar' )) {
81+ def fileName = " ${ archivesBaseName} -${ version} .aar"
82+ // def fileName = "${archivesBaseName}-debug.aar"
83+ // output.outputFile = new File(outputFile.parent, fileName)
84+ outputFileName = fileName
7885 }
7986 }
8087 }
8188
89+
8290 repositories {
8391 if (rootProject. ext. publishToMavenLocal)
8492 {
8593 mavenLocal()
8694 }
95+ else
96+ {
97+ mavenCentral()
98+ }
8799 jcenter()
88100 maven {
89101 url " https://maven.google.com"
0 commit comments