Skip to content

Instantly share code, notes, and snippets.

@farleylai
Last active November 19, 2015 06:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save farleylai/43ccba01ed0787b0f6a0 to your computer and use it in GitHub Desktop.
Save farleylai/43ccba01ed0787b0f6a0 to your computer and use it in GitHub Desktop.
A Complete build.gradle for the Experimental Android Gradle Plugin
apply plugin: 'com.android.model.application'
def MSB = ['AutoCor', 'BitonicSort', 'BitonicSortRecursive', 'FFT2', 'FFT3', 'FIR', 'FIRcoarse', 'FMRadio']
MSB << 'MatrixMult' << 'MatrixMultBlock' << 'MergeSort' << 'Repeater'
MSB << 'BeepBeep' << 'MFCC' << 'Crowd'
model {
compileOptions.with {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
android {
compileSdkVersion = 22
buildToolsVersion = '22.0.0'
defaultConfig.with {
minSdkVersion.apiLevel = 15
targetSdkVersion.apiLevel = 21
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions.excludes += 'LICENSE.txt'
}
android.ndk {
moduleName = "ESMS"
// toolchain = "clang"
// toolchainVersion = "3.5"
CFlags += ["-O3"]
cppFlags += ["-O3", "-I$projectDir/src/main/jni/cluster".toString()]
ldLibs += ["log", "stdc++"]
stl = "stlport_shared"
}
android.buildTypes {
debug {
ndk.with {
abiFilters += "armeabi-v7a"
}
}
// release {
// isMinifyEnabled = false
// proguardFiles += getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// signingConfig signingConfigs.DefaultConfig
// }
}
android.productFlavors {
MSB.each {
def msb = it
['ESMSAA', 'ESMSAoC', 'ESMSIP'].each {
def cfg = it
create(msb + cfg) {
applicationId = 'esms.msb.' + msb + cfg['ESMS'.length()..-1]
}
}
['StreamIt', 'CacheOpt'].each {
if(it == 'CacheOpt' && (msb == 'MFCC' || msb == 'Crowd')) return
def cfg = it
create(msb + cfg) {
applicationId = 'streamit.msb.' + msb + (msb == 'StreamIt' ? '' : 'CacheOpt')
}
}
}
}
}
dependencies {
compile project(':MSL')
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support.test:runner:0.3'
compile 'com.android.support.test:rules:0.3'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment