mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
* [CI] Install more dependencies * [Simulator] Some upgrades * [CI] Fix Metrics * Re-add newlines
85 lines
2.2 KiB
Groovy
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)}}
|