mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2026-01-15 08:10:09 +01:00
78 lines
2.4 KiB
Groovy
78 lines
2.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 34
|
|
buildToolsVersion "30.0.3"
|
|
|
|
defaultConfig {
|
|
applicationId "com.gpl.rpg.AndorsTrail"
|
|
minSdkVersion 14
|
|
targetSdkVersion 34
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
manifestPlaceholders icon_name: 'icon', fileproviderPath: 'AndorsTrail'
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
}
|
|
debug {
|
|
manifestPlaceholders icon_name: 'icon_beta', fileproviderPath: 'AndorsTrail.beta2'
|
|
applicationIdSuffix 'beta2'
|
|
signingConfig signingConfigs.debug
|
|
}
|
|
}
|
|
namespace 'com.gpl.rpg.AndorsTrail'
|
|
|
|
sourceSets {
|
|
main {
|
|
res.srcDirs = ['build/gen-res', 'src/main/res']
|
|
assets.srcDirs = ['build/gen-assets', 'src/main/assets']
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
|
}
|
|
|
|
task copyRes(type: Copy) {
|
|
description "Copies the res folder to the modules res folder (& renames .tmx to .xml)"
|
|
from "${rootDir}/res"
|
|
into "${projectDir}/build/gen-res"
|
|
rename "(.*)\\.tmx", "\$1.xml"
|
|
}
|
|
|
|
task copyResValuesIn(type: Copy) {
|
|
description "Exception Indonesian language code (Old IN was renamed to now ID)"
|
|
from "${rootDir}/res/values-id/"
|
|
into "${projectDir}/build/gen-res/values-in/"
|
|
}
|
|
|
|
task copyTranslation(type: Copy) {
|
|
description("Copies the translation files to the modules translations folder")
|
|
from "${rootDir}/assets/translation"
|
|
into "${projectDir}/build/gen-assets/translation"
|
|
}
|
|
|
|
task cleanup(type: Delete) {
|
|
description("Deletes the assets/translation and the res folder from the modules folder")
|
|
delete "${projectDir}/build/gen-res", "${projectDir}/build/gen-assets/translation"
|
|
}
|
|
|
|
afterEvaluate {
|
|
project.tasks.copyRes.dependsOn project.tasks.copyResValuesIn
|
|
|
|
mergeDebugResources.dependsOn project.tasks.copyRes
|
|
extractDeepLinksDebug.dependsOn project.tasks.copyRes
|
|
mergeReleaseResources.dependsOn project.tasks.copyRes
|
|
extractDeepLinksRelease.dependsOn project.tasks.copyRes
|
|
|
|
mergeDebugAssets.dependsOn project.tasks.copyTranslation
|
|
mergeReleaseAssets.dependsOn project.tasks.copyTranslation
|
|
extractDeepLinksDebug.dependsOn project.tasks.copyTranslation
|
|
extractDeepLinksRelease.dependsOn project.tasks.copyTranslation
|
|
|
|
clean.dependsOn project.tasks.cleanup
|
|
}
|