2021-01-31 22:11:26 +01:00
|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
id 'kotlin-android'
|
|
|
|
id 'kotlin-kapt'
|
2023-01-24 19:08:27 +01:00
|
|
|
id 'com.google.dagger.hilt.android'
|
2022-06-07 00:05:39 +02:00
|
|
|
id 'idea'
|
2022-07-29 17:29:11 +02:00
|
|
|
id 'org.jetbrains.kotlin.plugin.serialization' version "$kotlin_version"
|
2022-06-07 00:05:39 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
idea.module {
|
2022-08-17 12:28:31 +02:00
|
|
|
// These are not viable to index on most systems so exclude them to prevent IDE crashes
|
2022-06-07 00:05:39 +02:00
|
|
|
excludeDirs.add(file("libraries/boost"))
|
|
|
|
excludeDirs.add(file("libraries/llvm"))
|
2021-01-31 22:11:26 +01:00
|
|
|
}
|
2019-06-29 02:35:14 +02:00
|
|
|
|
|
|
|
android {
|
2022-03-06 17:02:52 +01:00
|
|
|
namespace 'emu.skyline'
|
2023-01-24 17:15:19 +01:00
|
|
|
compileSdk 33
|
2022-03-06 17:02:52 +01:00
|
|
|
|
2022-06-17 08:56:18 +02:00
|
|
|
var isBuildSigned = (System.getenv("CI") == "true") && (System.getenv("IS_SKYLINE_SIGNED") == "true")
|
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
defaultConfig {
|
2019-09-24 22:54:27 +02:00
|
|
|
applicationId "skyline.emu"
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2023-01-24 17:15:19 +01:00
|
|
|
minSdk 29
|
|
|
|
targetSdk 33
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2019-10-18 12:52:38 +02:00
|
|
|
versionCode 3
|
2021-03-28 16:35:13 +02:00
|
|
|
versionName "0.0.3"
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
ndk {
|
2023-01-24 17:15:19 +01:00
|
|
|
//noinspection ChromeOsAbiSupport
|
2019-07-02 23:32:20 +02:00
|
|
|
abiFilters "arm64-v8a"
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
2022-06-17 08:56:18 +02:00
|
|
|
|
|
|
|
if (isBuildSigned)
|
2022-12-21 13:20:44 +01:00
|
|
|
manifestPlaceholders += [shouldSaveUserData: "true"]
|
2022-06-17 08:56:18 +02:00
|
|
|
else
|
2022-12-21 13:20:44 +01:00
|
|
|
manifestPlaceholders += [shouldSaveUserData: "false"]
|
|
|
|
|
|
|
|
// Only enable separate process for release builds
|
|
|
|
manifestPlaceholders += [emulationProcess: ""]
|
2023-02-06 18:21:44 +01:00
|
|
|
|
|
|
|
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
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
2021-01-22 04:02:01 +01:00
|
|
|
|
|
|
|
/* JVM Bytecode Options */
|
2021-02-08 05:17:17 +01:00
|
|
|
def javaVersion = JavaVersion.VERSION_1_8
|
2021-03-29 20:40:48 +02:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = javaVersion.toString()
|
2022-06-28 09:23:45 +02:00
|
|
|
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
|
2021-03-29 20:40:48 +02:00
|
|
|
}
|
2023-03-16 13:55:32 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility javaVersion
|
|
|
|
targetCompatibility javaVersion
|
|
|
|
}
|
2021-03-29 20:40:48 +02:00
|
|
|
|
2023-03-16 14:03:22 +01:00
|
|
|
packagingOptions {
|
|
|
|
jniLibs.useLegacyPackaging = true
|
|
|
|
}
|
|
|
|
|
2022-05-30 17:23:17 +02:00
|
|
|
signingConfigs {
|
|
|
|
ci {
|
2022-06-11 13:35:20 +02:00
|
|
|
storeFile file(System.getenv("SIGNING_STORE_PATH") ?: "${System.getenv("user.home")}/keystore.jks")
|
2022-05-30 17:23:17 +02:00
|
|
|
storePassword System.getenv("SIGNING_STORE_PASSWORD")
|
|
|
|
keyAlias System.getenv("SIGNING_KEY_ALIAS")
|
|
|
|
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
buildTypes {
|
|
|
|
release {
|
2019-10-18 12:52:38 +02:00
|
|
|
debuggable true
|
Framebuffer and NativeActivity
What was added:
* Framebuffer
* NativeActivity
* NV Services
* IOCTL Handler
* NV Devices:
* * /dev/nvmap - 0xC0080101, 0xC0080103, 0xC0200104, 0xC0180105, 0xC00C0109, 0xC008010E
* * /dev/nvhost-as-gpu
* * /dev/nvhost-channel - 0x40044801, 0xC0104809, 0xC010480B, 0xC018480C, 0x4004480D, 0xC020481A, 0x40084714
* * /dev/nvhost-ctrl
* * /dev/nvhost-ctrl-gpu - 0x80044701, 0x80284702, 0xC0184706, 0xC0B04705, 0x80084714
* SVCs:
* * SetMemoryAttribute
* * CreateTransferMemory
* * ResetSignal
* * GetSystemTick
* Addition of Compact Logger
What was fixed:
* SVCs:
* * SetHeapSize
* * SetMemoryAttribute
* * QueryMemory
* A release build would not set CMAKE_BUILD_TYPE to "RELEASE"
* The logger code was simplified
2019-11-13 21:09:31 +01:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DCMAKE_BUILD_TYPE=RELEASE"
|
|
|
|
}
|
|
|
|
}
|
2019-07-24 22:19:43 +02:00
|
|
|
minifyEnabled true
|
2019-10-18 12:52:38 +02:00
|
|
|
shrinkResources true
|
|
|
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
2022-06-17 08:56:18 +02:00
|
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
2022-12-21 13:20:44 +01:00
|
|
|
manifestPlaceholders += [emulationProcess: ":emulationProcess"]
|
2019-07-24 22:19:43 +02:00
|
|
|
}
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2022-10-07 17:05:35 +02:00
|
|
|
reldebug {
|
|
|
|
debuggable true
|
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
|
|
|
arguments "-DCMAKE_BUILD_TYPE=RELWITHDEBINFO"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
minifyEnabled false
|
|
|
|
shrinkResources false
|
|
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
|
|
|
}
|
|
|
|
|
2019-07-24 22:19:43 +02:00
|
|
|
debug {
|
2019-10-18 12:52:38 +02:00
|
|
|
debuggable true
|
2019-06-29 02:35:14 +02:00
|
|
|
minifyEnabled false
|
2019-10-18 12:52:38 +02:00
|
|
|
shrinkResources false
|
2022-06-17 08:56:18 +02:00
|
|
|
signingConfig = isBuildSigned ? signingConfigs.ci : signingConfigs.debug
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
|
|
|
}
|
2021-10-26 07:15:49 +02:00
|
|
|
|
2022-09-30 14:22:09 +02:00
|
|
|
flavorDimensions += "version"
|
|
|
|
productFlavors {
|
|
|
|
full {
|
|
|
|
dimension = "version"
|
2022-12-21 13:20:44 +01:00
|
|
|
manifestPlaceholders += [appLabel: "Skyline"]
|
2022-09-30 14:22:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
dev {
|
|
|
|
dimension = "version"
|
|
|
|
applicationIdSuffix = ".dev"
|
|
|
|
versionNameSuffix = "-dev"
|
2022-12-21 13:20:44 +01:00
|
|
|
manifestPlaceholders += [appLabel: "Skyline Dev"]
|
2022-09-30 14:22:09 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-29 20:40:48 +02:00
|
|
|
buildFeatures {
|
|
|
|
viewBinding true
|
|
|
|
}
|
2021-01-22 04:02:01 +01:00
|
|
|
|
|
|
|
/* Linting */
|
2022-03-06 17:02:52 +01:00
|
|
|
lint {
|
2021-01-22 04:02:01 +01:00
|
|
|
disable 'IconLocation'
|
|
|
|
}
|
|
|
|
|
2022-04-04 14:56:06 +02:00
|
|
|
/* NDK and CMake */
|
2022-08-17 12:28:31 +02:00
|
|
|
ndkVersion '25.0.8775105'
|
2019-06-29 02:35:14 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2022-08-17 12:28:31 +02:00
|
|
|
version '3.22.1+'
|
2019-06-29 02:35:14 +02:00
|
|
|
path "CMakeLists.txt"
|
|
|
|
}
|
|
|
|
}
|
2021-03-03 21:40:16 +01:00
|
|
|
|
2021-03-27 22:17:35 +01:00
|
|
|
/* Android Assets */
|
2022-03-06 17:02:52 +01:00
|
|
|
androidResources {
|
|
|
|
ignoreAssetsPattern '*.md'
|
2021-03-03 21:40:16 +01:00
|
|
|
}
|
2019-06-29 02:35:14 +02:00
|
|
|
|
2021-10-26 07:15:49 +02:00
|
|
|
/* Vulkan Validation Layers */
|
|
|
|
sourceSets {
|
2022-10-07 17:05:35 +02:00
|
|
|
reldebug {
|
|
|
|
jniLibs {
|
|
|
|
srcDir "libraries/vklayers"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-26 07:15:49 +02:00
|
|
|
debug {
|
|
|
|
jniLibs {
|
|
|
|
srcDir "libraries/vklayers"
|
|
|
|
}
|
2021-03-27 22:17:35 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
dependencies {
|
2021-01-22 04:02:01 +01:00
|
|
|
/* Google */
|
2023-01-24 19:08:27 +01:00
|
|
|
implementation 'androidx.core:core-ktx:1.9.0'
|
|
|
|
implementation 'androidx.appcompat:appcompat:1.6.0'
|
2022-08-17 12:28:31 +02:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
2022-03-06 17:02:52 +01:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.2.0'
|
2022-12-27 18:23:41 +01:00
|
|
|
implementation 'androidx.activity:activity-ktx:1.6.1'
|
2023-01-24 19:08:27 +01:00
|
|
|
implementation 'com.google.android.material:material:1.8.0'
|
2019-12-10 21:51:02 +01:00
|
|
|
implementation 'androidx.documentfile:documentfile:1.0.1'
|
2021-01-30 14:59:11 +01:00
|
|
|
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
|
2023-01-24 19:08:27 +01:00
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.1"
|
|
|
|
implementation 'androidx.fragment:fragment-ktx:1.5.5'
|
2021-01-31 22:11:26 +01:00
|
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
2023-01-24 19:08:27 +01:00
|
|
|
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
2021-10-14 16:18:24 +02:00
|
|
|
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2022-06-28 09:23:45 +02:00
|
|
|
/* Kotlin */
|
2022-07-29 17:29:11 +02:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
2023-01-24 19:08:27 +01:00
|
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.1"
|
2022-06-28 09:23:45 +02:00
|
|
|
|
2021-10-16 13:27:29 +02:00
|
|
|
/* JetBrains */
|
2021-01-30 14:59:11 +01:00
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
2021-01-22 04:02:01 +01:00
|
|
|
|
|
|
|
/* Other Java */
|
|
|
|
implementation 'info.debatty:java-string-similarity:2.0.0'
|
2022-08-04 01:25:29 +02:00
|
|
|
implementation 'com.github.KikiManjaro:colorpicker:v1.1.12'
|
2023-04-24 17:44:39 +02:00
|
|
|
implementation 'com.github.android:renderscript-intrinsics-replacement-toolkit:344be3f'
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
2021-10-26 07:15:49 +02:00
|
|
|
|
|
|
|
kapt {
|
|
|
|
correctErrorTypes true
|
|
|
|
}
|