upgraded Gradle 8.0.2 -> 8.2.2
This commit is contained in:
parent
041690f8bd
commit
140b8ced08
192 changed files with 162 additions and 187 deletions
154
build.gradle
154
build.gradle
|
|
@ -1,150 +1,4 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.0.2'
|
||||
classpath 'gradle.plugin.at.zierler:yaml-validator-plugin:1.5.0'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'at.zierler.yamlvalidator'
|
||||
|
||||
apply from: 'gradle/scripts/constants.gradle'
|
||||
apply from: 'gradle/scripts/dictionary-tools.gradle'
|
||||
apply from: 'gradle/scripts/validate-languages.gradle'
|
||||
apply from: 'gradle/scripts/version-tools.gradle'
|
||||
|
||||
configurations.configureEach {
|
||||
yamlValidator {
|
||||
searchPaths = ['languages/definitions']
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.core:core:1.10.1'
|
||||
implementation 'androidx.preference:preference:1.2.1'
|
||||
|
||||
// fixes 'duplicate class error' when using "androidx.core" > 1.9.0
|
||||
// see: https://stackoverflow.com/a/77323424
|
||||
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.0"))
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
google()
|
||||
maven {
|
||||
url "https://plugins.gradle.org/m2/"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('validateLanguages') {
|
||||
mustRunAfter(validateYaml)
|
||||
inputs.dir fileTree(dir: LANGUAGES_INPUT_DIR)
|
||||
outputs.file "${project.buildDir}/lang.validation.txt"
|
||||
|
||||
doLast {
|
||||
validateLanguageFiles(DEFINITIONS_INPUT_DIR, DICTIONARIES_INPUT_DIR, outputs.files.singleFile)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('copyLanguages', Copy) {
|
||||
from LANGUAGES_INPUT_DIR
|
||||
include '**/*.csv'
|
||||
include '**/*.txt'
|
||||
include '**/*.yml'
|
||||
into LANGUAGES_OUTPUT_DIR
|
||||
}
|
||||
|
||||
tasks.register('calculateDictionarySizes') {
|
||||
inputs.dir fileTree(dir: DICTIONARIES_INPUT_DIR)
|
||||
outputs.dir DICTIONARIES_OUTPUT_DIR
|
||||
|
||||
doLast {
|
||||
getDictionarySizes(DICTIONARIES_INPUT_DIR, DICTIONARIES_OUTPUT_DIR)
|
||||
}
|
||||
}
|
||||
|
||||
clean {
|
||||
delete LANGUAGES_OUTPUT_DIR
|
||||
}
|
||||
|
||||
|
||||
// using the exported Closures directly causes weird values, hence the extra wrappers here
|
||||
def getVerCode = { -> return getVersionCode() }
|
||||
def getVerName = { -> return getVersionName() }
|
||||
def getVersionString = { flavor -> return flavor == 'debug' ? getDebugVersion() : getReleaseVersion() }
|
||||
|
||||
android {
|
||||
namespace "io.github.sspanak.tt9"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
//noinspection ExpiredTargetSdkVersion
|
||||
targetSdk 30
|
||||
compileSdk 33
|
||||
versionCode getVerCode()
|
||||
versionName getVerName()
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest.srcFile 'AndroidManifest.xml'
|
||||
java.srcDirs = ['src']
|
||||
resources.srcDirs = ['src']
|
||||
aidl.srcDirs = ['src']
|
||||
res.srcDirs = ['res']
|
||||
assets.srcDirs = ['assets']
|
||||
}
|
||||
|
||||
// Move the build types to build-types/<type>
|
||||
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
|
||||
// This moves them out of them default location under src/<type>/... which would
|
||||
// conflict with src/ being used by the main source set.
|
||||
// Adding new build types or product flavors should be accompanied
|
||||
// by a similar customization.
|
||||
debug.setRoot('build-types/debug')
|
||||
release.setRoot('build-types/release')
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug { data ->
|
||||
data.buildConfigField 'String', 'VERSION_FULL', "\"${getVersionString('debug')}\""
|
||||
}
|
||||
|
||||
release { data ->
|
||||
data.buildConfigField 'String', 'VERSION_FULL', "\"${getVersionString('release')}\""
|
||||
|
||||
debuggable false
|
||||
jniDebuggable false
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
aidl true
|
||||
buildConfig true
|
||||
renderScript false
|
||||
}
|
||||
|
||||
|
||||
applicationVariants.configureEach { variant ->
|
||||
tasks.named("generate${variant.name.capitalize()}Assets")?.configure {
|
||||
dependsOn(validateLanguages, copyLanguages, calculateDictionarySizes)
|
||||
}
|
||||
|
||||
tasks.named("lintAnalyzeDebug")?.configure {
|
||||
mustRunAfter(copyLanguages, calculateDictionarySizes)
|
||||
}
|
||||
|
||||
tasks.named("lintVitalAnalyzeRelease")?.configure {
|
||||
mustRunAfter(copyLanguages, calculateDictionarySizes)
|
||||
}
|
||||
}
|
||||
}
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '8.2.2' apply false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue