mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-29 00:05:37 +03:00
e3e92ce1d4
We don't always have access to CI secrets, such as, when a certain CI action is triggered by a PR from an external repository then it won't have access to secrets and be signed. While we likely will allow for this in the future as all workflows do have to be approved, it is still important to not crash when keys are unavailable and have a graceful fallback for those situations.
134 lines
3.7 KiB
Groovy
134 lines
3.7 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-kapt'
|
|
id 'dagger.hilt.android.plugin'
|
|
id 'idea'
|
|
}
|
|
|
|
idea.module {
|
|
// These are not viable to index on most systems to exclude them to prevent IDE crashes
|
|
excludeDirs.add(file("libraries/boost"))
|
|
excludeDirs.add(file("libraries/llvm"))
|
|
}
|
|
|
|
android {
|
|
namespace 'emu.skyline'
|
|
|
|
compileSdkVersion 31
|
|
buildToolsVersion '33.0.0'
|
|
defaultConfig {
|
|
applicationId "skyline.emu"
|
|
|
|
minSdkVersion 29
|
|
targetSdkVersion 31
|
|
|
|
versionCode 3
|
|
versionName "0.0.3"
|
|
|
|
ndk {
|
|
abiFilters "arm64-v8a"
|
|
}
|
|
}
|
|
|
|
/* JVM Bytecode Options */
|
|
def javaVersion = JavaVersion.VERSION_1_8
|
|
compileOptions {
|
|
sourceCompatibility = javaVersion
|
|
targetCompatibility = javaVersion
|
|
}
|
|
kotlinOptions {
|
|
jvmTarget = javaVersion.toString()
|
|
}
|
|
|
|
signingConfigs {
|
|
ci {
|
|
storeFile file(System.getenv("SIGNING_STORE_PATH") ?: "${System.getenv("user.home")}/keystore.jks")
|
|
storePassword System.getenv("SIGNING_STORE_PASSWORD")
|
|
keyAlias System.getenv("SIGNING_KEY_ALIAS")
|
|
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
debuggable true
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DCMAKE_BUILD_TYPE=RELEASE"
|
|
}
|
|
}
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
signingConfig = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true") ? signingConfigs.ci : signingConfigs.debug
|
|
}
|
|
|
|
debug {
|
|
debuggable true
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
signingConfig = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true") ? signingConfigs.ci : signingConfigs.debug
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
}
|
|
|
|
/* Linting */
|
|
lint {
|
|
disable 'IconLocation'
|
|
}
|
|
|
|
/* NDK and CMake */
|
|
ndkVersion '25.0.8221429'
|
|
externalNativeBuild {
|
|
cmake {
|
|
version '3.18.1+'
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
/* Android Assets */
|
|
androidResources {
|
|
ignoreAssetsPattern '*.md'
|
|
}
|
|
|
|
/* Vulkan Validation Layers */
|
|
sourceSets {
|
|
debug {
|
|
jniLibs {
|
|
srcDir "libraries/vklayers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
/* Google */
|
|
implementation "androidx.core:core-ktx:1.7.0"
|
|
implementation 'androidx.appcompat:appcompat:1.4.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
|
implementation 'com.google.android.material:material:1.5.0'
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
|
implementation 'androidx.fragment:fragment-ktx:1.4.1'
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
|
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
|
|
|
/* JetBrains */
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
/* Other Java */
|
|
implementation 'info.debatty:java-string-similarity:2.0.0'
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes true
|
|
}
|