From 0200f20c73b901c8a285ab8f5d7c2992a0445bae Mon Sep 17 00:00:00 2001 From: pm chihya Date: Sat, 9 May 2026 20:52:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=B4=B4=E5=9B=BE=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 75145c2..2e925de 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,18 +6,8 @@ plugins { id("kotlin-parcelize") } -def sharedVersionFile = file("$projectDir/src/main/cpp/GakumasLocalify/VERSION") -if (!sharedVersionFile.exists()) { - 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() +def pluginVersionName = "v3.3.1" +def pluginVersionCode = 30301 android { namespace 'io.github.chinosk.gakumas.localify' @@ -28,9 +18,9 @@ android { applicationId "io.github.chinosk.gakumas.localify" minSdk 29 targetSdk 34 - versionCode sharedVersionCode - versionName sharedVersionName - buildConfigField "String", "VERSION_NAME", "\"${versionName}\"" + versionCode pluginVersionCode + versionName pluginVersionName + buildConfigField "String", "VERSION_NAME", "\"${pluginVersionName}\"" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables {