2
2
3
3
buildscript {
4
4
repositories {
5
+ apply plugin : ' maven-publish'
5
6
if (rootProject. ext. publishToMavenLocal) {
6
- apply plugin : ' maven-publish'
7
7
mavenLocal()
8
8
}
9
+ else
10
+ {
11
+ mavenCentral()
12
+ }
9
13
}
10
14
}
11
15
23
27
}
24
28
25
29
archivesBaseName= " AndroidMySQLConnector"
26
- version ' 0.49 '
30
+ version ' 0.52 '
27
31
group ' com.BoardiesITSolutions'
28
32
29
33
@@ -47,43 +51,51 @@ android {
47
51
}
48
52
49
53
println (" Is publishToMavenLocal set? " + rootProject. ext. publishToMavenLocal)
50
- if (rootProject. ext. publishToMavenLocal) {
51
- android. libraryVariants
54
+ android. libraryVariants
52
55
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" )
62
64
}
63
- repositories {
65
+ }
66
+ repositories {
67
+ if (rootProject. ext. publishToMavenLocal) {
64
68
mavenLocal()
65
69
}
70
+ else {
71
+ mavenCentral()
72
+ }
66
73
}
67
74
}
75
+ }
68
76
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
78
85
}
79
86
}
80
87
}
81
88
89
+
82
90
repositories {
83
91
if (rootProject. ext. publishToMavenLocal)
84
92
{
85
93
mavenLocal()
86
94
}
95
+ else
96
+ {
97
+ mavenCentral()
98
+ }
87
99
jcenter()
88
100
maven {
89
101
url " https://maven.google.com"
0 commit comments