- compileOptions inclduing the sourceCompatibility and targetCompatibility testInstrumentationRunner
- packagingOptions multiple cppFlags and ldLibs
- specifying of debug ndk abiFilters
- dynamic generation of android.productFlavors
- dependencies of 'com.android.support.test:runner:0.3' and 'com.android.support.test:rules:0.3' must be compile
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
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' | |
} |
No comments:
Post a Comment