-
Notifications
You must be signed in to change notification settings - Fork 18
/
common.gradle
98 lines (88 loc) · 3.02 KB
/
common.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
allprojects {
repositories {
jcenter()
flatDir {
dirs '../../../GearVRf/GVRf/gearvrf-libs', '../../../GearVRf/GVRf/Framework/framework/build/outputs/aar'
}
maven {
url "http://google.bintray.com/googlevr"
}
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
}
android {
compileSdkVersion 24
buildToolsVersion "25.0.0"
buildTypes {
debug {
resValue 'string', 'app_name', System.getProperty("appName")
}
release {
resValue 'string', 'app_name', System.getProperty("appName")
}
}
defaultConfig {
minSdkVersion 21
targetSdkVersion 21
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent,
System.getProperty("appName") + ".apk")
}
}
// ignore the x86 and arm-v8 files from the google vr libraries
packagingOptions {
exclude 'lib/x86/libgvr.so'
exclude 'lib/arm64-v8a/libgvr.so'
if (!rootProject.hasProperty("ARM64")) {
exclude 'lib/arm64-v8a/*.so'
}
}
}
task copyOculusSignature(type: Copy) {
if (rootProject.hasProperty("OCULUS_SIGS_DIRECTORY")) {
copy {
from rootProject.property("OCULUS_SIGS_DIRECTORY")
into 'src/main/assets'
include 'oculussig_*'
}
}
}
preBuild {}.dependsOn copyOculusSignature
ext.gearvrfVersion='3.1.1-SNAPSHOT'
project.ext.jomlVersion = "1.9.1-SNAPSHOT"
dependencies {
compile "org.joml:joml-android:${jomlVersion}"
if(project.hasProperty("useLocalDependencies") && project.useLocalDependencies) {
compile(name: 'framework-debug', ext: 'aar')
} else {
compile "org.gearvrf:framework:$gearvrfVersion"
}
if (rootProject.hasProperty("only_daydream")) {
if(project.hasProperty("useLocalDependencies") && project.useLocalDependencies) {
compile(name: 'backend_daydream-debug', ext: 'aar')
} else {
compile "org.gearvrf:backend_daydream:$gearvrfVersion"
}
compile 'com.google.vr:sdk-base:1.10.0'
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
} else {
if (rootProject.hasProperty("no_oculus")) {
compile(name: 'backend-debug', ext: 'aar')
} else { //default oculus+daydream
if(project.hasProperty("useLocalDependencies") && project.useLocalDependencies) {
compile(name: 'backend_daydream-debug', ext: 'aar')
compile(name: 'backend_oculus-debug', ext: 'aar')
} else {
compile "org.gearvrf:backend_daydream:$gearvrfVersion"
compile "org.gearvrf:backend_oculus:$gearvrfVersion"
}
compile 'com.google.vr:sdk-base:1.10.0'
compile 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-7'
}
}
}