blob: cd774147946640a0920b18ce930cd518a7af3aa9 [file] [log] [blame]
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// This configures the Gradle build system, but not the GVR components.
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
// For GVR components, the official source of the .aars is JCenter.
jcenter()
maven {
// For Android support library components.
url "https://maven.google.com"
}
// You can also use a local Maven repository if desired.
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// The dependencies for NDK builds live inside the .aar files so they need to
// be extracted before NDK targets can build.
task extractAudioSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-audio-1.180.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr_audio.so"
}
task extractGvrSo(type: Copy) {
from zipTree("${project.rootDir}/libraries/sdk-base-1.180.0.aar")
into "${project.rootDir}/libraries/"
include "jni/**/libgvr.so"
}
task extractNdk { }
extractNdk.dependsOn extractAudioSo
extractNdk.dependsOn extractGvrSo
task deleteNdk(type: Delete) {
delete "${project.rootDir}/libraries/jni"
}
clean.dependsOn(deleteNdk)