@@ -13,6 +13,8 @@ description = 'Android SQLite compatibility library'
1313
1414ext {
1515 PUBLISH_ARTIFACT_ID = name + " -plangrid"
16+ PUBLISH_GROUP_ID = group
17+ PUBLISH_VERSION = version
1618}
1719
1820android {
@@ -60,84 +62,8 @@ dependencies {
6062 androidTestImplementation ' androidx.test.ext:junit:1.1.0'
6163}
6264
63- publish. dependsOn " assembleRelease"
64- bintrayUpload. dependsOn " assembleRelease"
65-
6665ext {
6766 sqliteDistributionUrl = ' https://sqlite.org/2019/sqlite-amalgamation-3300100.zip'
68- pomXml = {
69- resolveStrategy = DELEGATE_FIRST
70- name project. PUBLISH_ARTIFACT_ID
71- description project. description
72- url ' https://github.com/requery/sqlite-android'
73- scm {
74- url ' https://github.com/requery/sqlite-android.git'
75- connection ' scm:git:git://github.com/requery/sqlite-android.git'
76- developerConnection ' scm:git:git@github.com/requery/sqlite-android.git'
77- }
78- licenses {
79- license {
80- name ' The Apache Software License, Version 2.0'
81- url ' http://www.apache.org/license/LICENSE-2.0.txt'
82- distribution ' repo'
83- }
84- }
85- developers {
86- developer {
87- id ' npurushe'
88- name ' Nikhil Purushe'
89- }
90- }
91- }
92- }
93-
94- android. libraryVariants
95- publishing {
96- publications {
97- maven(MavenPublication ) {
98- groupId project. group
99- artifactId project. PUBLISH_ARTIFACT_ID
100- version project. version
101- artifact " build/outputs/aar/${ project.name} -release.aar"
102- artifact sourcesJar
103- artifact javadocJar
104- pom. withXml {
105- asNode(). children(). last() + project. pomXml
106- def dependencies = asNode(). appendNode(' dependencies' )
107- configurations. compile. allDependencies. each {
108- def dependency = dependencies. appendNode(' dependency' )
109- dependency. appendNode(' groupId' , it. group)
110- dependency. appendNode(' artifactId' , it. name)
111- dependency. appendNode(' version' , it. version)
112- dependency. appendNode(' scope' , ' compile' )
113- }
114- }
115- }
116- }
117- }
118-
119- Properties properties = new Properties ()
120- File localProperties = project. rootProject. file(' local.properties' )
121- if (localProperties. exists()) {
122- properties. load(localProperties. newDataInputStream())
123- }
124-
125- bintray {
126- user = properties. getProperty(' bintray.user' )
127- key = properties. getProperty(' bintray.apikey' )
128- publications = [' maven' ]
129- pkg {
130- repo = ' requery'
131- name = ' sqlite-android'
132- userOrg = ' requery'
133- licenses = [' Apache-2.0' ]
134- vcsUrl = ' https://github.com/requery/sqlite-android.git'
135- version {
136- name = project. version
137- desc = project. description
138- released = new Date ()
139- }
140- }
14167}
14268
14369task sourcesJar (type : Jar ) {
@@ -170,4 +96,6 @@ task installSqlite(dependsOn: downloadSqlite, type: Copy) {
17096 into ' src/main/jni/sqlite'
17197}
17298
173- preBuild. dependsOn installSqlite
99+ preBuild. dependsOn installSqlite
100+
101+ apply from : ' android-release-aar.gradle'
0 commit comments