Skip to content

Commit

Permalink
Update gradle config
Browse files Browse the repository at this point in the history
  • Loading branch information
luoyesiqiu committed Jul 23, 2023
1 parent 3537cc4 commit eb2f7a6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 11 deletions.
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,14 @@
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
}

ext {
groupId = "com.github.luoyesiqiu"
publishVersion = "1.0.0"
minSdk = 16
compileSdk = 33
targetSdk = 33
ndkVersion = "23.1.7779620"
cmakeVersion = "3.22.1"
}
16 changes: 10 additions & 6 deletions safecall/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ plugins {
id 'maven-publish'
}

group = rootProject.ext.groupId
version = rootProject.ext.publishVersion

android {
namespace 'com.luoye.safecall'
compileSdk 33
compileSdk rootProject.ext.compileSdk
ndkVersion rootProject.ext.ndkVersion

defaultConfig {
minSdk 21
targetSdk 33
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk

externalNativeBuild {
cmake {
Expand All @@ -27,7 +31,7 @@ android {
externalNativeBuild {
cmake {
path "src/main/c/CMakeLists.txt"
version "3.22.1"
version rootProject.ext.cmakeVersion
}
}

Expand All @@ -50,9 +54,9 @@ afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId = 'com.github.luoyesiqiu'
groupId = rootProject.ext.groupId
artifactId = 'SafeCall'
version = '1.0.0'
version = rootProject.ext.publishVersion
artifact("$buildDir/outputs/aar/safecall-release.aar")
}
}
Expand Down
10 changes: 5 additions & 5 deletions safecall_sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ plugins {

android {
namespace 'com.luoye.safecaller'
compileSdk 33

compileSdk rootProject.ext.compileSdk
ndkVersion rootProject.ext.ndkVersion
defaultConfig {
applicationId "com.luoye.safecaller"
minSdk 21
targetSdk 33
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
versionCode 1
versionName "1.0"

Expand All @@ -29,7 +29,7 @@ android {
externalNativeBuild {
cmake {
path file('src/main/c/CMakeLists.txt')
version '3.22.1'
version rootProject.ext.cmakeVersion
}
}
buildFeatures {
Expand Down

0 comments on commit eb2f7a6

Please sign in to comment.