77 lines
2.2 KiB
Groovy
77 lines
2.2 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:2.3.1'
|
|
}
|
|
}
|
|
apply plugin: 'android'
|
|
|
|
android {
|
|
compileSdkVersion 19
|
|
buildToolsVersion '25.0.0'
|
|
|
|
defaultConfig {
|
|
applicationId = 'com.omigamedev'
|
|
minSdkVersion 9
|
|
targetSdkVersion 19
|
|
// This block is different from the one you use to link Gradle
|
|
// to your CMake or ndk-build script.
|
|
externalNativeBuild {
|
|
// For ndk-build, instead use the ndkBuild block
|
|
cmake {
|
|
// Passes optional arguments to CMake.
|
|
//arguments "-DANDROID_ARM_NEON=TRUE", "-DANDROID_TOOLCHAIN=clang"
|
|
// Sets optional flags for the C compiler.
|
|
//cFlags "-D_EXAMPLE_C_FLAG1", "-D_EXAMPLE_C_FLAG2"
|
|
// Sets a flag to enable format macro constants for the C++ compiler.
|
|
//cppFlags "-D__STDC_FORMAT_MACROS"
|
|
arguments '-DANDROID_PLATFORM=android-19',
|
|
'-DANDROID_TOOLCHAIN=clang',
|
|
'-DANDROID_STL=gnustl_static',
|
|
'-DCMAKE_BUILD_TYPE=Debug',
|
|
'-DANDROID_ARM_NEON=TRUE'
|
|
}
|
|
}
|
|
ndk {
|
|
// Specifies the ABI configurations of your native
|
|
// libraries Gradle should build and package with your APK.
|
|
// abiFilters 'x86', 'x86_64', 'armeabi', 'armeabi-v7a', 'arm64-v8a'
|
|
abiFilters 'armeabi-v7a'
|
|
}
|
|
}
|
|
|
|
// productFlavors {
|
|
// main {
|
|
// externalNativeBuild {
|
|
// cmake {
|
|
// targets "native-lib-demo"
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFile getDefaultProguardFile('proguard-android.txt')
|
|
}
|
|
}
|
|
|
|
// Encapsulates your external native build configurations.
|
|
externalNativeBuild {
|
|
// Encapsulates your CMake build configurations.
|
|
cmake {
|
|
// Provides a relative path to your CMake build script.
|
|
path "CMakeLists.txt"
|
|
}
|
|
}
|
|
}
|
|
|
|
task copyFiles(type: Copy) {
|
|
from '../data/'
|
|
into 'src/main/assets/data'
|
|
}
|
|
preBuild.dependsOn(copyFiles)
|