Files
EhViewer/app/build.gradle
T
2016-02-26 14:22:35 +08:00

79 lines
2.2 KiB
Groovy

import org.apache.tools.ant.taskdefs.condition.Os
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.hippo.ehviewer"
minSdkVersion 15
targetSdkVersion 23
versionCode 48
versionName "0.9.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
java.srcDirs += 'src/main/java-gen'
// Disable default NdkCompile task
jni.srcDirs = []
// Set new jni lib dir
jniLibs.srcDir 'src/main/libs'
// Vector res dir
res.srcDirs += 'src/main/res-vector'
}
}
// noinspection GroovyAssignabilityCheck
task ndkBuild(type: Exec, description: 'Compile JNI source via NDK') {
def ndkDir = project.plugins.findPlugin('com.android.application').sdkHandler.getNdkFolder()
def ndkBuilder
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
ndkBuilder = 'ndk-build.cmd'
} else {
ndkBuilder = 'ndk-build'
}
commandLine "$ndkDir\\$ndkBuilder",
'-C', file('src/main/jni').absolutePath,
'-j', Runtime.runtime.availableProcessors()
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
}
clean {
delete file('src/main/obj').absolutePath
delete file('src/main/libs').absolutePath
}
dependencies {
compile project(':anani')
compile project(':beerbelly')
compile project(':conaco')
compile project(':easyrecyclerview')
compile project(':hotspot')
compile project(':okhttp3')
compile project(':rippleold')
compile project(':unifile')
compile project(':vector')
compile project(':yorozuya')
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:customtabs:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'de.greenrobot:greendao:2.0.0'
compile 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
}