forked from MrBoboFace/QuestPlayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (46 loc) · 1.72 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
apply plugin: 'com.android.application'
import org.apache.tools.ant.taskdefs.condition.Os
android {
compileSdkVersion 22
buildToolsVersion '25.0.0'
// useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.qsp.player"
minSdkVersion 17
targetSdkVersion 22
}
sourceSets.main {
jniLibs.srcDir "src/main/libs"
jni.srcDirs = []
}
task ndkBuild(type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
def ndkDir = properties.getProperty("ndk.dir")
def ndkBuild = "$ndkDir/ndk-build" + (Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : "")
commandLine ndkBuild, "-C", file("src/main/").absolutePath
}
task ndkClean(type: Exec) {
Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
def ndkDir = properties.getProperty("ndk.dir")
def ndkBuild = "$ndkDir/ndk-build" + (Os.isFamily(Os.FAMILY_WINDOWS) ? ".cmd" : "")
commandLine ndkBuild, "-C", file("src/main/").absolutePath, "clean"
}
tasks.withType(JavaCompile) {
compileTask -> compileTask.dependsOn ndkBuild
}
clean.dependsOn "ndkClean"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.1'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
// compile 'com.android.support:appcompat-v7:24.2.0'
// compile 'com.android.support:design:24.2.0'
}