Skip to content

Commit

Permalink
Migrate teapots to convention plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
DanAlbert committed May 9, 2024
1 parent 7b03aec commit 053faca
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 104 deletions.
27 changes: 6 additions & 21 deletions teapots/choreographer-30fps/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
plugins {
id 'com.android.application'
id "ndksamples.android.application"
}

android {
compileSdk 33
ndkVersion '25.1.8937393'
namespace 'com.sample.choreographer'

defaultConfig {
applicationId 'com.sample.choreographer'
minSdkVersion 16
targetSdkVersion 33
ndk {
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static'
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}

externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.sample.choreographer'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation libs.appcompat
implementation libs.androidx.constraintlayout
}
27 changes: 6 additions & 21 deletions teapots/classic-teapot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
plugins {
id 'com.android.application'
id "ndksamples.android.application"
}

android {
compileSdk 33
ndkVersion '25.1.8937393'
namespace 'com.sample.teapot'

defaultConfig {
applicationId = 'com.sample.teapot'
minSdkVersion 17
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static'
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}

externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.sample.teapot'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation libs.appcompat
implementation libs.androidx.constraintlayout
}
26 changes: 6 additions & 20 deletions teapots/image-decoder/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,28 @@
plugins {
id 'com.android.application'
id "ndksamples.android.application"
}

android {
compileSdk 33
ndkVersion '25.1.8937393'
namespace 'com.sample.imagedecoder'

defaultConfig {
applicationId = 'com.sample.imagedecoder'
minSdkVersion 30
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static'
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}

externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.sample.imagedecoder'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation libs.appcompat
implementation libs.androidx.constraintlayout
}
27 changes: 6 additions & 21 deletions teapots/more-teapots/build.gradle
Original file line number Diff line number Diff line change
@@ -1,41 +1,26 @@
plugins {
id 'com.android.application'
id "ndksamples.android.application"
}

android {
compileSdk 33
ndkVersion '25.1.8937393'
namespace 'com.sample.moreteapots'

defaultConfig {
applicationId 'com.sample.moreteapots'
minSdkVersion 21
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static'
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}

externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.sample.moreteapots'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation libs.appcompat
implementation libs.androidx.constraintlayout
}
27 changes: 6 additions & 21 deletions teapots/textured-teapot/build.gradle
Original file line number Diff line number Diff line change
@@ -1,42 +1,27 @@
plugins {
id 'com.android.application'
id "ndksamples.android.application"
}

android {
compileSdk 33
ndkVersion '25.1.8937393'
namespace 'com.sample.texturedteapot'

defaultConfig {
applicationId = 'com.sample.texturedteapot'
minSdkVersion 17
targetSdkVersion 33
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a','x86', 'x86_64'
}
externalNativeBuild {
cmake {
arguments '-DANDROID_TOOLCHAIN=clang',
'-DANDROID_STL=c++_static'
arguments '-DANDROID_STL=c++_static'
}
}
}
buildTypes {
release {
minifyEnabled = false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}

externalNativeBuild {
cmake {
path 'src/main/cpp/CMakeLists.txt'
}
}
namespace 'com.sample.texturedteapot'
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation libs.appcompat
implementation libs.androidx.constraintlayout
}

0 comments on commit 053faca

Please sign in to comment.