mirror of
https://github.com/vanilla-wiiu/vanilla.git
synced 2026-10-28 09:43:51 +00:00
- Port vanilla-pipe on Android for users with rooted devices and compatible Wi-Fi hardware - Drop OpenSSL as a build dependency (only used for hostap's crypto backend, but didn't work on Android so now we're using hostap's internal crypto) - Improvements to event loop (targets 180Hz input polling + 60Hz video display) - Implement MediaCodec hardware decoding on Android - Use smaller and simpler DHCP client
83 lines
2.3 KiB
Groovy
83 lines
2.3 KiB
Groovy
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY');
|
|
def buildAsApplication = !buildAsLibrary
|
|
if (buildAsApplication) {
|
|
apply plugin: 'com.android.application'
|
|
}
|
|
else {
|
|
apply plugin: 'com.android.library'
|
|
}
|
|
|
|
android {
|
|
if (buildAsApplication) {
|
|
namespace "com.mattkc.vanilla"
|
|
}
|
|
compileSdkVersion 34
|
|
defaultConfig {
|
|
minSdkVersion 21
|
|
targetSdkVersion 34
|
|
versionCode 1
|
|
versionName "1.0"
|
|
externalNativeBuild {
|
|
// ndkBuild {
|
|
// arguments "APP_PLATFORM=android-19"
|
|
// abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
// }
|
|
cmake {
|
|
arguments "-DANDROID_APP_PLATFORM=android-21", "-DANDROID_STL=c++_static"
|
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
|
version "3.31"
|
|
}
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
}
|
|
}
|
|
packagingOptions {
|
|
jniLibs {
|
|
// Ensure libvanilla_pipe.so is accessible alongside main executable
|
|
useLegacyPackaging true
|
|
}
|
|
}
|
|
sourceSets.main.assets.setSrcDirs(['../../gui/assets'])
|
|
applicationVariants.all { variant ->
|
|
tasks["merge${variant.name.capitalize()}Assets"]
|
|
.dependsOn("externalNativeBuild${variant.name.capitalize()}")
|
|
}
|
|
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) {
|
|
sourceSets.main {
|
|
jniLibs.srcDir 'libs'
|
|
}
|
|
externalNativeBuild {
|
|
// ndkBuild {
|
|
// path 'jni/Android.mk'
|
|
// }
|
|
cmake {
|
|
path 'jni/CMakeLists.txt'
|
|
}
|
|
}
|
|
|
|
}
|
|
lint {
|
|
abortOnError false
|
|
}
|
|
|
|
if (buildAsLibrary) {
|
|
libraryVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
def outputFile = output.outputFile
|
|
if (outputFile != null && outputFile.name.endsWith(".aar")) {
|
|
def fileName = "com.mattkc.vanilla.aar";
|
|
output.outputFile = new File(outputFile.parent, fileName);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
}
|