2021-01-31 22:11:26 +01:00
|
|
|
plugins {
|
|
|
|
id 'com.android.application'
|
|
|
|
id 'kotlin-android'
|
|
|
|
id 'kotlin-kapt'
|
|
|
|
id 'dagger.hilt.android.plugin'
|
|
|
|
}
|
2019-06-29 02:35:14 +02:00
|
|
|
|
|
|
|
android {
|
2020-06-15 18:01:24 +02:00
|
|
|
compileSdkVersion 30
|
2021-01-22 04:02:01 +01:00
|
|
|
buildToolsVersion '30.0.3'
|
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
|
|
|
|
2019-11-15 19:14:40 +01:00
|
|
|
minSdkVersion 26
|
2020-09-17 22:38:23 +02:00
|
|
|
targetSdkVersion 30
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2019-10-18 12:52:38 +02:00
|
|
|
versionCode 3
|
|
|
|
versionName "0.3"
|
2021-01-22 04:02:01 +01:00
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
ndk {
|
2019-07-02 23:32:20 +02:00
|
|
|
abiFilters "arm64-v8a"
|
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-01-22 04:02:01 +01:00
|
|
|
compileOptions {
|
|
|
|
sourceCompatibility = javaVersion
|
|
|
|
targetCompatibility = javaVersion
|
2020-05-28 07:39:36 +02:00
|
|
|
}
|
2021-03-29 20:40:48 +02:00
|
|
|
kotlinOptions {
|
|
|
|
jvmTarget = javaVersion.toString()
|
|
|
|
}
|
|
|
|
|
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'
|
|
|
|
signingConfig signingConfigs.debug
|
2019-07-24 22:19:43 +02:00
|
|
|
}
|
2021-01-22 04:02:01 +01:00
|
|
|
|
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
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
|
|
|
}
|
2021-03-29 20:40:48 +02:00
|
|
|
buildFeatures {
|
|
|
|
prefab true
|
|
|
|
viewBinding true
|
|
|
|
}
|
2021-01-22 04:02:01 +01:00
|
|
|
|
|
|
|
/* Linting */
|
|
|
|
lintOptions {
|
|
|
|
disable 'IconLocation'
|
|
|
|
}
|
|
|
|
|
|
|
|
/* NDK */
|
2021-04-03 22:58:49 +02:00
|
|
|
ndkVersion '22.1.7171670'
|
2019-06-29 02:35:14 +02:00
|
|
|
externalNativeBuild {
|
|
|
|
cmake {
|
2021-01-22 04:02:01 +01:00
|
|
|
version '3.18.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
|
|
|
/* Vulkan Validation Layers */
|
|
|
|
sourceSets {
|
|
|
|
debug {
|
|
|
|
main {
|
|
|
|
jniLibs {
|
|
|
|
srcDir "$buildDir/generated/vulkan_layers"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Android Assets */
|
2021-03-03 21:40:16 +01:00
|
|
|
aaptOptions {
|
|
|
|
ignoreAssetsPattern "*.md"
|
|
|
|
}
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|
|
|
|
|
2021-03-27 22:17:35 +01:00
|
|
|
/**
|
|
|
|
* We just want VK_LAYER_KHRONOS_validation in the APK while NDK contains several other legacy layers
|
|
|
|
* This task copies shared objects associated with that layer into a folder from where JNI can use it
|
|
|
|
*/
|
|
|
|
task setupValidationLayer(type: Copy) {
|
|
|
|
doFirst {
|
|
|
|
def folder = new File("$buildDir/generated/vulkan_layers")
|
|
|
|
if (!folder.exists()) {
|
|
|
|
folder.mkdirs() // We need to recursively create all directories as the copy requires the output directory to exist
|
|
|
|
}
|
|
|
|
}
|
|
|
|
from("${android.ndkDirectory}/sources/third_party/vulkan/src/build-android/jniLibs") {
|
|
|
|
include "*/libVkLayer_khronos_validation.so"
|
|
|
|
}
|
|
|
|
into "$buildDir/generated/vulkan_layers"
|
|
|
|
}
|
|
|
|
|
|
|
|
afterEvaluate {
|
|
|
|
preDebugBuild.dependsOn setupValidationLayer
|
|
|
|
}
|
|
|
|
|
2019-06-29 02:35:14 +02:00
|
|
|
dependencies {
|
2021-01-22 04:02:01 +01:00
|
|
|
/* Filetrees */
|
|
|
|
implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
|
|
|
|
|
|
|
|
/* Google */
|
2021-01-30 14:59:11 +01:00
|
|
|
implementation "androidx.core:core-ktx:1.3.2"
|
2020-05-28 07:39:36 +02:00
|
|
|
implementation 'androidx.appcompat:appcompat:1.2.0'
|
2021-01-22 04:02:01 +01:00
|
|
|
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
|
2021-02-08 05:17:17 +01:00
|
|
|
implementation 'androidx.preference:preference-ktx:1.1.1'
|
|
|
|
implementation 'com.google.android.material:material:1.3.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'
|
|
|
|
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
|
|
|
|
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
|
2021-03-29 20:22:11 +02:00
|
|
|
implementation 'androidx.fragment:fragment-ktx:1.3.2'
|
2021-01-31 22:11:26 +01:00
|
|
|
implementation "com.google.dagger:hilt-android:$hilt_version"
|
|
|
|
kapt "com.google.dagger:hilt-android-compiler:$hilt_version"
|
2021-02-09 16:11:56 +01:00
|
|
|
implementation 'com.google.android:flexbox:2.0.1'
|
2021-01-22 04:02:01 +01:00
|
|
|
|
|
|
|
/* Kotlin */
|
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'
|
|
|
|
|
|
|
|
/* NDK */
|
|
|
|
implementation files("libraries/mbedtls.aar")
|
2019-06-29 02:35:14 +02:00
|
|
|
}
|