Files
Upsilon/ion/src/simulator/android/build.gradle
mickbot-92 ee8d456f1e [CI] [Simulator] Fix CI building (#381)
* [CI] Install more dependencies

* [Simulator] Some upgrades

* [CI] Fix Metrics

* Re-add newlines
2025-02-26 13:05:40 +00:00

85 lines
2.2 KiB
Groovy

def BUILD_DIR = '../../../../'+System.getenv('BUILD_DIR')+'/app'
def projectVariable(name) {
/* This function retrieves a variable from the environment and falls back
* to the Gradle projects's properties (e.g. ~/.gradle/gradle.properties) */
return System.getenv('ANDROID_'+name) ?: project.findProperty('EPSILON_'+name)
}
def fileIfPath(path) {
return path ? new File(path) : null
}
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.1'
}
}
allprojects {
repositories {
mavenCentral()
google()
}
buildDir = BUILD_DIR
}
apply plugin: 'com.android.application'
android {
namespace = "io.github.upsilon.simulator"
compileSdkVersion 35
defaultConfig {
applicationId "io.github.upsilon.simulator"
minSdkVersion 21
targetSdkVersion 33
def d=new Date()
versionCode Instant.now().getEpochSecond().toInteger()
versionName LocalDate.now().format("yyyyMMdd")+'-'+System.getenv('UPSILON_VERSION')
}
signingConfigs {
environment {
storeFile fileIfPath(projectVariable('SIGNING_STORE_FILE'))
storePassword projectVariable('SIGNING_STORE_PASSWORD')
keyAlias projectVariable('SIGNING_KEY_ALIAS')
keyPassword projectVariable('SIGNING_KEY_PASSWORD')
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt')
if (projectVariable('SIGNING_STORE_FILE')) {
signingConfig = signingConfigs.environment
} else {
signingConfig = signingConfigs.debug
}
}
}
sourceSets{
main {
manifest.srcFile 'src/AndroidManifest.xml'
res.srcDir BUILD_DIR + '/res'
java.srcDir 'src'
jniLibs.srcDir BUILD_DIR + '/libs/' + System.getenv('EPSILON_VARIANT')
assets.srcDir '../assets'
}
}
lintOptions {
abortOnError = false
checkReleaseBuilds = false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:1.7.0"
implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.1.10"))
}
java{toolchain{languageVersion=JavaLanguageVersion.of(21)}}