mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
81 lines
2.5 KiB
Groovy
81 lines
2.5 KiB
Groovy
import com.android.builder.model.ProductFlavor
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 21
|
|
buildToolsVersion "21.1.2"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 16
|
|
targetSdkVersion 21
|
|
|
|
versionName "3.1.2-beta1"
|
|
versionCode = 55
|
|
}
|
|
|
|
productFlavors {
|
|
root {
|
|
applicationId "com.limelight.root"
|
|
}
|
|
|
|
nonRoot {
|
|
applicationId "com.limelight"
|
|
}
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
}
|
|
}
|
|
|
|
sourceSets.main.jni.srcDirs = []
|
|
|
|
//noinspection GroovyAssignabilityCheck,GroovyAssignabilityCheck
|
|
task ndkBuild(type: Exec, description: 'Compile JNI source via NDK') {
|
|
Properties properties = new Properties()
|
|
properties.load(project.rootProject.file('local.properties').newDataInputStream())
|
|
def ndkDir = properties.getProperty('ndk.dir')
|
|
|
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
commandLine "$ndkDir\\ndk-build.cmd",
|
|
'NDK_PROJECT_PATH=build/intermediates/ndk',
|
|
'NDK_LIBS_OUT=src/main/jniLibs',
|
|
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
|
|
'NDK_APPLICATION_MK=src/main/jni/Application.mk'
|
|
}
|
|
else {
|
|
commandLine "$ndkDir/ndk-build",
|
|
'NDK_PROJECT_PATH=build/intermediates/ndk',
|
|
'NDK_LIBS_OUT=src/main/jniLibs',
|
|
'APP_BUILD_SCRIPT=src/main/jni/Android.mk',
|
|
'NDK_APPLICATION_MK=src/main/jni/Application.mk'
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
compileTask -> compileTask.dependsOn ndkBuild
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile group: 'org.jcodec', name: 'jcodec', version: '0.1.9'
|
|
|
|
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.51'
|
|
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.51'
|
|
|
|
compile group: 'com.google.android', name: 'support-v4', version:'r7'
|
|
compile group: 'com.koushikdutta.ion', name: 'ion', version:'2.0.5'
|
|
compile group: 'com.google.code.gson', name: 'gson', version:'2.3.1'
|
|
|
|
compile group: 'com.squareup.okhttp', name: 'okhttp', version:'2.2.0'
|
|
compile group: 'com.squareup.okio', name:'okio', version:'1.2.0'
|
|
|
|
compile files('libs/jmdns-fixed.jar')
|
|
compile files('libs/limelight-common.jar')
|
|
compile files('libs/tinyrtsp.jar')
|
|
}
|