添加贴图替换功能
This commit is contained in:
parent
36a49ba4df
commit
0200f20c73
|
|
@ -6,18 +6,8 @@ plugins {
|
||||||
id("kotlin-parcelize")
|
id("kotlin-parcelize")
|
||||||
}
|
}
|
||||||
|
|
||||||
def sharedVersionFile = file("$projectDir/src/main/cpp/GakumasLocalify/VERSION")
|
def pluginVersionName = "v3.3.1"
|
||||||
if (!sharedVersionFile.exists()) {
|
def pluginVersionCode = 30301
|
||||||
throw new GradleException("Shared version file not found: ${sharedVersionFile}")
|
|
||||||
}
|
|
||||||
def sharedVersionName = sharedVersionFile.text.trim()
|
|
||||||
def sharedVersionMatcher = sharedVersionName =~ /^v?(\d+)\.(\d+)\.(\d+).*$/
|
|
||||||
if (!sharedVersionMatcher.matches()) {
|
|
||||||
throw new GradleException("Invalid shared version: ${sharedVersionName}")
|
|
||||||
}
|
|
||||||
def sharedVersionCode = sharedVersionMatcher[0][1].toInteger() * 10000 +
|
|
||||||
sharedVersionMatcher[0][2].toInteger() * 100 +
|
|
||||||
sharedVersionMatcher[0][3].toInteger()
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace 'io.github.chinosk.gakumas.localify'
|
namespace 'io.github.chinosk.gakumas.localify'
|
||||||
|
|
@ -28,9 +18,9 @@ android {
|
||||||
applicationId "io.github.chinosk.gakumas.localify"
|
applicationId "io.github.chinosk.gakumas.localify"
|
||||||
minSdk 29
|
minSdk 29
|
||||||
targetSdk 34
|
targetSdk 34
|
||||||
versionCode sharedVersionCode
|
versionCode pluginVersionCode
|
||||||
versionName sharedVersionName
|
versionName pluginVersionName
|
||||||
buildConfigField "String", "VERSION_NAME", "\"${versionName}\""
|
buildConfigField "String", "VERSION_NAME", "\"${pluginVersionName}\""
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables {
|
vectorDrawables {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue