Skip to content

Commit 72e8d2b

Browse files
Adjust AAR filename for new Gradle release
1 parent 21282d9 commit 72e8d2b

File tree

1 file changed

+34
-47
lines changed

1 file changed

+34
-47
lines changed

android-database-sqlcipher/build.gradle

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,58 +5,45 @@ apply from: "maven.gradle"
55

66
android {
77

8-
compileSdkVersion "${compileAndroidSdkVersion}" as Integer
9-
10-
defaultConfig {
11-
versionName "${clientVersionNumber}"
12-
minSdkVersion "${minimumAndroidSdkVersion}"
13-
targetSdkVersion "${targetAndroidSdkVersion}"
14-
versionCode 1
15-
versionName "${clientVersionNumber}"
16-
}
17-
18-
editorconfig {
19-
includes = ["src/**", "*.gradle"]
20-
excludes = ["src/main/external/sqlcipher/**", "src/main/external/openssl-*/**"]
21-
}
22-
23-
buildTypes {
24-
debug {
25-
debuggable true
8+
compileSdkVersion "${compileAndroidSdkVersion}" as Integer
9+
10+
defaultConfig {
11+
versionName "${clientVersionNumber}"
12+
minSdkVersion "${minimumAndroidSdkVersion}"
13+
targetSdkVersion "${targetAndroidSdkVersion}"
14+
versionCode 1
15+
versionName "${clientVersionNumber}"
16+
archivesBaseName = "${archivesBaseName}-${versionName}"
2617
}
27-
release {
28-
debuggable false
29-
minifyEnabled false
18+
19+
editorconfig {
20+
includes = ["src/**", "*.gradle"]
21+
excludes = ["src/main/external/sqlcipher/**", "src/main/external/openssl-*/**"]
3022
}
31-
}
3223

33-
sourceSets {
34-
main {
35-
jniLibs.srcDirs "${rootProject.ext.nativeRootOutputDir}/libs"
24+
buildTypes {
25+
debug {
26+
debuggable true
27+
}
28+
release {
29+
debuggable false
30+
minifyEnabled false
31+
}
3632
}
37-
}
38-
39-
dependencies {
40-
implementation "androidx.sqlite:sqlite:2.0.1"
41-
}
42-
43-
clean.dependsOn cleanNative
44-
check.dependsOn editorconfigCheck
45-
buildNative.mustRunAfter buildAmalgamation
46-
buildAmalgamation.mustRunAfter buildOpenSSL
47-
preBuild.dependsOn([buildOpenSSL, buildAmalgamation, buildNative])
48-
49-
afterEvaluate {
50-
android.libraryVariants.all { variant ->
51-
variant.outputs.each { output ->
52-
def outputFile = output.outputFile
53-
if (outputFile != null && outputFile.name.endsWith(".aar")) {
54-
def buildSuffix = variant.buildType.debuggable ? "-debug" : ""
55-
def versionFileName = "${archivesBaseName}-${clientVersionNumber}${buildSuffix}.aar"
56-
output.outputFileName = versionFileName
33+
34+
sourceSets {
35+
main {
36+
jniLibs.srcDirs "${rootProject.ext.nativeRootOutputDir}/libs"
5737
}
58-
}
5938
}
60-
}
6139

40+
dependencies {
41+
implementation "androidx.sqlite:sqlite:2.0.1"
42+
}
43+
44+
clean.dependsOn cleanNative
45+
check.dependsOn editorconfigCheck
46+
buildNative.mustRunAfter buildAmalgamation
47+
buildAmalgamation.mustRunAfter buildOpenSSL
48+
preBuild.dependsOn([buildOpenSSL, buildAmalgamation, buildNative])
6249
}

0 commit comments

Comments
 (0)