107 lines
2.5 KiB
Groovy
107 lines
2.5 KiB
Groovy
buildscript {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.1.4'
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "org.meumeu.wivrn"
|
|
ndkVersion "26.1.10909125"
|
|
|
|
defaultConfig {
|
|
applicationId "org.meumeu.wivrn"
|
|
// for Vulkan, need at least 24
|
|
// for AImage_getHardwareBuffer, API 26
|
|
minSdkVersion 29
|
|
compileSdkVersion 29
|
|
|
|
versionName = "1.0"
|
|
versionCode = 1
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DANDROID_TOOLCHAIN=clang', '-DANDROID_STL=c++_static', '-DCMAKE_ANDROID_NDK_VERSION=' + ndkVersion, '-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DWIVRN_USE_SYSTEM_FREETYPE=OFF', '-DWIVRN_BUILD_CLIENT=ON', '-DWIVRN_BUILD_SERVER=OFF'
|
|
resValue "string", "app_name", "WiVRn"
|
|
}
|
|
}
|
|
}
|
|
|
|
signingConfigs {
|
|
if (project.hasProperty("signingKeyPassword")) {
|
|
release {
|
|
storeFile file("ks.keystore")
|
|
keyAlias "default_key"
|
|
storePassword signingKeyPassword // Set in gradle.properties
|
|
keyPassword signingKeyPassword
|
|
enableV2Signing true
|
|
}
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
if (project.hasProperty("signingKeyPassword")) {
|
|
release {
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
|
|
debugWithValidationLayer {
|
|
initWith debug
|
|
externalNativeBuild {
|
|
cmake {
|
|
arguments '-DUSE_ANDROID_VALIDATION_LAYER=ON'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
flavorDimensions "device"
|
|
|
|
productFlavors {
|
|
pico {
|
|
dimension "device"
|
|
externalNativeBuild {
|
|
cmake {
|
|
abiFilters 'arm64-v8a'
|
|
arguments '-DPICO=ON'
|
|
}
|
|
}
|
|
}
|
|
standard {
|
|
dimension "device"
|
|
externalNativeBuild {
|
|
cmake {
|
|
abiFilters 'arm64-v8a', 'x86_64'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
manifest.srcFile 'AndroidManifest.xml'
|
|
res.srcDir 'resources'
|
|
}
|
|
}
|
|
|
|
externalNativeBuild {
|
|
cmake {
|
|
version '3.22.1'
|
|
path 'CMakeLists.txt'
|
|
}
|
|
}
|
|
}
|