mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
87 lines
2.6 KiB
Groovy
87 lines
2.6 KiB
Groovy
import com.android.builder.model.ProductFlavor
|
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
compileSdkVersion 23
|
|
buildToolsVersion "23.0.2"
|
|
|
|
defaultConfig {
|
|
minSdkVersion 16
|
|
targetSdkVersion 23
|
|
|
|
versionName "4.5.3.1"
|
|
versionCode = 89
|
|
}
|
|
|
|
productFlavors {
|
|
root {
|
|
applicationId "com.limelight.root"
|
|
}
|
|
|
|
nonRoot {
|
|
applicationId "com.limelight"
|
|
}
|
|
}
|
|
|
|
lintOptions {
|
|
disable 'MissingTranslation'
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
|
}
|
|
}
|
|
|
|
// These lines are required to avoid dexing issues with the BouncyCastle library
|
|
// bundled with limelight-common.jar
|
|
packagingOptions {
|
|
exclude 'META-INF/BCKEY.SF'
|
|
exclude 'META-INF/BCKEY.DSA'
|
|
}
|
|
|
|
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.bouncycastle', name: 'bcprov-jdk15on', version: '1.52'
|
|
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.52'
|
|
|
|
compile group: 'com.squareup.okhttp', name: 'okhttp', version:'2.4.0'
|
|
compile group: 'com.squareup.okio', name:'okio', version:'1.5.0'
|
|
|
|
compile files('libs/jmdns-3.4.2.jar')
|
|
compile files('libs/limelight-common.jar')
|
|
compile files('libs/tinyrtsp.jar')
|
|
compile files('libs/jcodec-0.1.9-patched.jar')
|
|
}
|