mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-24 08:55:10 +00:00
209 lines
6.4 KiB
Groovy
209 lines
6.4 KiB
Groovy
plugins {
|
|
id 'com.android.application'
|
|
id 'kotlin-android'
|
|
id 'kotlin-kapt'
|
|
id 'com.google.dagger.hilt.android'
|
|
id 'idea'
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
|
|
}
|
|
|
|
idea.module {
|
|
// These are not viable to index on most systems so exclude them to prevent IDE crashes
|
|
excludeDirs.add(file("libraries/boost"))
|
|
excludeDirs.add(file("libraries/llvm"))
|
|
}
|
|
|
|
android {
|
|
namespace 'emu.skyline'
|
|
compileSdk 35
|
|
|
|
var isBuildSigned = (System.getenv("CI") == "true") && (System.getenv("IS_BUILD_SIGNED") == "true")
|
|
|
|
defaultConfig {
|
|
applicationId "io.github.pine.emu"
|
|
|
|
minSdk 29
|
|
targetSdk 35
|
|
|
|
versionCode 1
|
|
versionName "1.0.0"
|
|
|
|
ndk {
|
|
//noinspection ChromeOsAbiSupport
|
|
abiFilters "arm64-v8a"
|
|
}
|
|
|
|
// Disable the use of a separate process for emulation by default
|
|
manifestPlaceholders["emulationProcess"] = ""
|
|
|
|
// Only enable separate process for release builds
|
|
manifestPlaceholders += [emulationProcess: ""]
|
|
|
|
def locales = ["en", "de", "el", "es", "es-419", "fr", "hu", "id", "it", "ja", "ko", "pl", "ru", "ta", "zh-Hans", "zh-Hant"]
|
|
|
|
// Add available locales to the build config so that they can be accessed from the app
|
|
buildConfigField "String[]", "AVAILABLE_APP_LANGUAGES", "new String[]{\"" + locales.join("\",\"") + "\"}"
|
|
// Uncomment the following line whenever AAPT2 will properly support BCP47 language tags
|
|
//resourceConfigurations += locales
|
|
}
|
|
|
|
/* JVM Bytecode Options */
|
|
def javaVersion = JavaVersion.VERSION_17
|
|
kotlinOptions {
|
|
jvmTarget = javaVersion.toString()
|
|
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
|
|
}
|
|
compileOptions {
|
|
sourceCompatibility javaVersion
|
|
targetCompatibility javaVersion
|
|
}
|
|
|
|
packagingOptions {
|
|
jniLibs.useLegacyPackaging = true
|
|
}
|
|
|
|
signingConfigs {
|
|
ci {
|
|
storeFile file(System.getenv("SIGNING_STORE_PATH"))
|
|
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",
|
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
|
}
|
|
}
|
|
minifyEnabled true
|
|
shrinkResources true
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
|
manifestPlaceholders += [emulationProcess: ":emulationProcess"]
|
|
}
|
|
|
|
reldebug {
|
|
debuggable true
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO",
|
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
|
}
|
|
}
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
|
}
|
|
|
|
debug {
|
|
debuggable true
|
|
minifyEnabled false
|
|
shrinkResources false
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
|
}
|
|
}
|
|
|
|
flavorDimensions += "version"
|
|
productFlavors {
|
|
full {
|
|
dimension = "version"
|
|
manifestPlaceholders += [appLabel: "Pine"]
|
|
}
|
|
|
|
dev {
|
|
dimension = "version"
|
|
applicationIdSuffix = ".dev"
|
|
versionNameSuffix = "-dev"
|
|
manifestPlaceholders += [appLabel: "Pine Dev"]
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
viewBinding true
|
|
buildConfig true
|
|
}
|
|
|
|
/* Linting */
|
|
lint {
|
|
disable 'IconLocation'
|
|
}
|
|
|
|
/* NDK and CMake */
|
|
ndkVersion '27.2.12479018'
|
|
externalNativeBuild {
|
|
cmake {
|
|
version '3.22.1+'
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
|
|
/* Android Assets */
|
|
androidResources {
|
|
ignoreAssetsPattern '*.md'
|
|
}
|
|
|
|
/* Vulkan Validation Layers */
|
|
sourceSets {
|
|
reldebug {
|
|
jniLibs {
|
|
srcDir "libraries/vklayers"
|
|
}
|
|
}
|
|
|
|
debug {
|
|
jniLibs {
|
|
srcDir "libraries/vklayers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
/* Google */
|
|
implementation 'androidx.core:core-ktx:1.12.0'
|
|
implementation 'androidx.appcompat:appcompat:1.6.1'
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
|
implementation 'androidx.preference:preference-ktx:1.2.1'
|
|
implementation 'androidx.activity:activity-ktx:1.8.2'
|
|
implementation 'com.google.android.material:material:1.10.0'
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
|
implementation 'androidx.window:window:1.2.0'
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.2"
|
|
implementation 'androidx.fragment:fragment-ktx:1.6.2'
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
|
implementation 'androidx.palette:palette-ktx:1.0.0'
|
|
|
|
/* Kotlin */
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
implementation 'org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2'
|
|
|
|
/* JetBrains */
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
/* Other Java */
|
|
implementation 'info.debatty:java-string-similarity:2.0.0'
|
|
implementation 'com.github.KikiManjaro:colorpicker:v1.1.12'
|
|
implementation 'com.github.android:renderscript-intrinsics-replacement-toolkit:344be3f'
|
|
|
|
/* Network */
|
|
implementation 'io.ktor:ktor-client-core:3.0.3'
|
|
implementation 'io.ktor:ktor-client-cio:3.0.3'
|
|
implementation 'io.ktor:ktor-client-json:3.0.3'
|
|
implementation 'io.ktor:ktor-serialization-kotlinx-json:3.0.3'
|
|
implementation 'io.ktor:ktor-client-content-negotiation:3.0.3'
|
|
implementation 'io.ktor:ktor-client-logging:3.0.3'
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes true
|
|
}
|