forked from Xeeynamo/sonic-hybrid-rsdk
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
883 additions
and
91 deletions.
There are no files selected for viewing
86 changes: 18 additions & 68 deletions
86
sonic3air-main/framework/external/sdl/SDL2/android-project/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,25 @@ | ||
def buildAsLibrary = project.hasProperty('BUILD_AS_LIBRARY'); | ||
def buildAsApplication = !buildAsLibrary | ||
if (buildAsApplication) { | ||
apply plugin: 'com.android.application' | ||
} | ||
else { | ||
apply plugin: 'com.android.library' | ||
} | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
|
||
android { | ||
compileSdkVersion 31 | ||
defaultConfig { | ||
if (buildAsApplication) { | ||
applicationId "org.libsdl.app" | ||
} | ||
minSdkVersion 16 | ||
targetSdkVersion 31 | ||
versionCode 1 | ||
versionName "1.0" | ||
externalNativeBuild { | ||
ndkBuild { | ||
arguments "APP_PLATFORM=android-16" | ||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' | ||
} | ||
// cmake { | ||
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static" | ||
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' | ||
// abiFilters 'arm64-v8a' | ||
// } | ||
} | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
} | ||
} | ||
applicationVariants.all { variant -> | ||
tasks["merge${variant.name.capitalize()}Assets"] | ||
.dependsOn("externalNativeBuild${variant.name.capitalize()}") | ||
buildscript { | ||
repositories { | ||
mavenCentral() | ||
google() | ||
} | ||
if (!project.hasProperty('EXCLUDE_NATIVE_LIBS')) { | ||
sourceSets.main { | ||
jniLibs.srcDir 'libs' | ||
} | ||
externalNativeBuild { | ||
ndkBuild { | ||
path 'jni/Android.mk' | ||
} | ||
// cmake { | ||
// path 'jni/CMakeLists.txt' | ||
// } | ||
} | ||
|
||
} | ||
lintOptions { | ||
abortOnError false | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:7.0.3' | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
|
||
if (buildAsLibrary) { | ||
libraryVariants.all { variant -> | ||
variant.outputs.each { output -> | ||
def outputFile = output.outputFile | ||
if (outputFile != null && outputFile.name.endsWith(".aar")) { | ||
def fileName = "org.libsdl.app.aar"; | ||
output.outputFile = new File(outputFile.parent, fileName); | ||
} | ||
} | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
mavenCentral() | ||
google() | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation fileTree(include: ['*.jar'], dir: 'libs') | ||
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} |
Oops, something went wrong.