Skip to content

Commit

Permalink
app/build.gradle: switch from += to add
Browse files Browse the repository at this point in the history
  • Loading branch information
proppy committed Nov 13, 2015
1 parent 0e15f2d commit 521eaa1
Show file tree
Hide file tree
Showing 16 changed files with 108 additions and 116 deletions.
20 changes: 9 additions & 11 deletions MoreTeapots/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ model {
}

android.ndk {
moduleName ="MoreTeapotsNativeActivity"
cppFlags += "-I${file("src/main/jni/cpufeatures")}".toString()
cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
cppFlags += "-I${file("src/main/jni/ndk_helper")}".toString()

moduleName = "MoreTeapotsNativeActivity"
cppFlags.addAll(["-I${file("src/main/jni/cpufeatures")}".toString(),
"-I${file("src/main/jni/native_app_glue")}".toString(),
"-I${file("src/main/jni/ndk_helper")}".toString()])
// CFlags is configured in similiar way as cppFlags
// CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()

ldLibs += ["android", "EGL", "GLESv2","log"]
// CFlags.add("-I${file("src/main/jni/native_app_glue")}".toString())
ldLibs.addAll(["android", "EGL", "GLESv2","log"])
stl = "stlport_static"
}

Expand All @@ -42,13 +40,13 @@ model {

android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
19 changes: 9 additions & 10 deletions Teapot/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ model {

android.ndk {
moduleName = "TeapotNativeActivity"
cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
cppFlags += "-I${file("src/main/jni/cpufeatures")}".toString()
cppFlags += "-I${file("src/main/jni/ndk_helper")}".toString()

cppFlags.addAll(["-I${file("src/main/jni/native_app_glue")}".toString(),
"-I${file("src/main/jni/cpufeatures")}".toString(),
"-I${file("src/main/jni/ndk_helper")}".toString()])
// CFlags is configured in similar way as cppFlags
// CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
ldLibs += ["android", "EGL", "GLESv2", "dl", "log"]
// CFlags.add("-I${file("src/main/jni/native_app_glue")}".toString())
ldLibs.addAll(["android", "EGL", "GLESv2", "dl", "log"])
stl = "stlport_static"
}
// jni is the default dir; config this if yours is in different directory
Expand All @@ -42,18 +41,18 @@ model {
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
6 changes: 3 additions & 3 deletions audio-echo/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ model {

android.ndk {
moduleName = "echo"
cppFlags += ["-std=c++11"]
ldLibs += ['android', 'log', 'OpenSLES']
cppFlags.add("-std=c++11")
ldLibs.addAll(['android', 'log', 'OpenSLES'])
stl = "gnustl_static"
}
android.buildTypes {
release {
minifyEnabled=false
proguardFiles+=file('proguard-android.txt')
proguardFiles.add(file('proguard-android.txt'))
}
}
android.productFlavors {
Expand Down
12 changes: 5 additions & 7 deletions bitmap-plasma/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,24 @@ model {

android.ndk {
moduleName = "plasma"
ldLibs += ["m","log","jnigraphics"]
ldLibs.addAll(["m","log","jnigraphics"])
}

android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')

println(proguardFiles)
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
14 changes: 7 additions & 7 deletions endless-tunnel/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ model {

android.ndk {
moduleName = "game"
cppFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
cppFlags += "-I${file("src/main/jni")}".toString()
cppFlags += "-I${file("src/main/jni/data")}".toString()
ldLibs += ["android", "EGL", "GLESv2", "OpenSLES", "log"]
cppFlags.addAll(["-I${file("src/main/jni/native_app_glue")}".toString(),
"-I${file("src/main/jni")}".toString(),
"-I${file("src/main/jni/data")}".toString()])
ldLibs.addAll(["android", "EGL", "GLESv2", "OpenSLES", "log"])
stl = "stlport_static"
}
android.lintOptions {
Expand All @@ -54,13 +54,13 @@ model {

android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
16 changes: 7 additions & 9 deletions gles3jni/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,27 @@ model {
}
android.ndk {
moduleName = "gles3jni"
cppFlags += "-Werror"
cppFlags += "-fno-rtti"
cppFlags += "-fno-exceptions"
CFlags += ["-Werror"]
ldLibs += ["log","GLESv3", "EGL"]
cppFlags.addAll(["-Werror", "-fno-rtti", "-fno-exceptions"])
CFlags.add("-Werror")
ldLibs.addAll(["log","GLESv3", "EGL"])
stl = "stlport_static"
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}

android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
12 changes: 6 additions & 6 deletions hello-gl2/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@ model {

android.ndk {
moduleName = "gl2jni"
cppFlags += "-Werror"
ldLibs += ["log", "GLESv2"]
cppFlags.add("-Werror")
ldLibs.addAll(["log", "GLESv2"])
}

android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}

android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
22 changes: 11 additions & 11 deletions hello-jni/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,41 @@ model {
moduleName = "hello-jni"
/*
* Other ndk flags configurable here are
* cppFlags += "-fno-rtti"
* cppFlags += "-fno-exceptions"
* ldLibs = ["android", "log"]
* cppFlags.add("-fno-rtti")
* cppFlags.add("-fno-exceptions")
* ldLibs.addAll(["android", "log"])
* stl = "system"
*/
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
create("arm") {
ndk.abiFilters += "armeabi"
ndk.abiFilters.add("armeabi")
}
create("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create("x86") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
create("x86-64") {
ndk.abiFilters += "x86_64"
ndk.abiFilters.add("x86_64")
}
create("mips") {
ndk.abiFilters += "mips"
ndk.abiFilters.add("mips")
}
create("mips-64") {
ndk.abiFilters += "mips64"
ndk.abiFilters.add("mips64")
}
// To include all cpu architectures, leaves abiFilters empty
create("all")
Expand Down
14 changes: 7 additions & 7 deletions hello-thirdparty/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,27 @@ model {

android.ndk {
moduleName = "native-activity"
cppFlags += "-I${file("src/main/jni")}".toString()
cppFlags += "-I${gpg_sdk_path}/include".toString()
cppFlags.addAll(["-I${file("src/main/jni")}".toString(),
"-I${gpg_sdk_path}/include".toString()])
stl = "c++_static"
ldLibs += ["log", "android", "EGL", "GLESv1_CM", "z"]
ldLibs.addAll(["log", "android", "EGL", "GLESv1_CM", "z"])
//
// NOTE: since libgpg is also linked to the stl:
// libc++ explicitly follows it in the list of libraries
// to prevent unresolved stl symbols.
//
ldLibs += ["gpg", "c++_static"]
ldLibs.addAll(["gpg", "c++_static"])
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.ldFlags += "-L${gpg_sdk_path}/lib/c++/armeabi-v7a".toString()
ndk.abiFilters.add("armeabi-v7a")
ndk.ldFlags.add("-L${gpg_sdk_path}/lib/c++/armeabi-v7a".toString())
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions native-activity/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ model {

android.ndk {
moduleName ="native-activity"
CFlags += "-I${file("src/main/jni/native_app_glue")}".toString()
ldLibs += ["log", "android", "EGL", "GLESv1_CM"]
CFlags.add("-I${file("src/main/jni/native_app_glue")}".toString())
ldLibs.addAll(["log", "android", "EGL", "GLESv1_CM"])
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
12 changes: 6 additions & 6 deletions native-audio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ model {

android.ndk {
moduleName = "native-audio-jni"
ldLibs += ["android","OpenSLES", "log"]
CFlags += ['-std=c99']
CFlags.add("-std=c99")
ldLibs.addAll(["android","OpenSLES", "log"])
}
android.buildTypes {
release {
minifyEnabled = false
proguardFiles += file('proguard-rules.txt')
proguardFiles.add(file('proguard-rules.txt'))
}
}
android.productFlavors {
create ("arm7") {
ndk.abiFilters += "armeabi-v7a"
ndk.abiFilters.add("armeabi-v7a")
}
create ("arm8") {
ndk.abiFilters += "arm64-v8a"
ndk.abiFilters.add("arm64-v8a")
}
create ("x86-32") {
ndk.abiFilters += "x86"
ndk.abiFilters.add("x86")
}
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
Expand Down
Loading

0 comments on commit 521eaa1

Please sign in to comment.