mirror of
https://github.com/xoureldeen/Vectras-VM-Android.git
synced 2026-04-28 14:30:03 +00:00
32 lines
2 KiB
Groovy
32 lines
2 KiB
Groovy
//file:noinspection UnnecessaryQualifiedReference, GrDeprecatedAPIUsage
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
|
|
buildToolsVersion '35.0.0'
|
|
compileSdk 35
|
|
}
|
|
|
|
android.namespace 'com.vectras.vm'
|
|
android.defaultConfig.minSdkVersion 21
|
|
android.buildTypes.debug.signingConfig null
|
|
android.buildFeatures.buildConfig true
|
|
android.compileOptions.sourceCompatibility SDK_VERSION
|
|
android.compileOptions.targetCompatibility SDK_VERSION
|
|
dependencies.compileOnly project(':shell-loader:stub')
|
|
android.applicationVariants.configureEach { outputs.configureEach { outputFileName = "loader.apk" } }
|
|
|
|
def signingConfig = project(':app').android.signingConfigs.debug
|
|
def keyStore = java.security.KeyStore.getInstance(java.security.KeyStore.getDefaultType())
|
|
keyStore.load(new FileInputStream(signingConfig.storeFile), signingConfig.keyPassword.toCharArray())
|
|
|
|
android.defaultConfig.buildConfigField "String", "logTag", "\"Termux:X11 loader\""
|
|
android.defaultConfig.buildConfigField "int", "SIGNATURE", String.valueOf(Arrays.hashCode(keyStore.getCertificate(signingConfig.keyAlias).getEncoded()))
|
|
android.defaultConfig.buildConfigField "String", "CLASS_ID", "\"com.vectras.vm.x11.CmdEntryPoint\""
|
|
android.defaultConfig.buildConfigField "String", "packageNotInstalledErrorText",
|
|
"""\"Termux:X11 application is not found.\" +
|
|
\"You should choose latest successful workflow here: https://github.com/termux/termux-x11/actions/workflows/debug_build.yml\" +
|
|
\"After this you should download \\"termux-x11-ARCH-debug\\" or \\"termux-x11-universal-debug\\" artifact and install apk contained in this zip file.\""""
|
|
android.defaultConfig.buildConfigField "String", "packageSignatureMismatchErrorText",
|
|
"\"Signature verification of target application " + android.namespace + " failed.\\nPlease, reinstall both termux-x11 package and Termux:X11 application from the same source\""
|
|
android.defaultConfig.buildConfigField "String", "COMMIT", "\"" + ("git rev-parse HEAD\n".execute().getText().trim() ?: (System.getenv('CURRENT_COMMIT') ?: "NO_COMMIT")) + "\""
|