91 lines
3.2 KiB
Groovy
91 lines
3.2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "com.zenkanji.app"
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "com.zenkanji.app"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
aaptOptions {
|
|
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
|
}
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
if (file("my-release-key.jks").exists()) {
|
|
storeFile file("my-release-key.jks")
|
|
if (project.hasProperty("RELEASE_KEY_PASSWORD")) {
|
|
storePassword RELEASE_KEY_PASSWORD
|
|
keyPassword RELEASE_KEY_PASSWORD
|
|
} else if (System.getenv("RELEASE_KEY_PASSWORD") != null) {
|
|
storePassword System.getenv("RELEASE_KEY_PASSWORD")
|
|
keyPassword System.getenv("RELEASE_KEY_PASSWORD")
|
|
} else {
|
|
storePassword "missing_password"
|
|
keyPassword "missing_password"
|
|
}
|
|
if (project.hasProperty("RELEASE_KEY_ALIAS")) {
|
|
keyAlias RELEASE_KEY_ALIAS
|
|
} else if (System.getenv("RELEASE_KEY_ALIAS") != null) {
|
|
keyAlias System.getenv("RELEASE_KEY_ALIAS")
|
|
} else {
|
|
keyAlias "my-key-alias"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.all {
|
|
outputFileName = "ZenKanji-${variant.versionName}.apk"
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
flatDir{
|
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
|
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
|
implementation project(':capacitor-android')
|
|
testImplementation "junit:junit:$junitVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
implementation project(':capacitor-cordova-android-plugins')
|
|
}
|
|
|
|
apply from: 'capacitor.build.gradle'
|
|
|
|
try {
|
|
def servicesJSON = file('google-services.json')
|
|
if (servicesJSON.text) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|
|
} catch(Exception e) {
|
|
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
}
|
|
|
|
configurations.all {
|
|
resolutionStrategy {
|
|
force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
|
|
force 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.22'
|
|
force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'
|
|
}
|
|
}
|