-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathbuild.gradle
83 lines (70 loc) · 2.27 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
apply plugin: 'io.github.gradle-nexus.publish-plugin'
apply from: 'config.gradle'
apply from: 'scripts/publish-root.gradle'
buildscript {
apply from: 'config.gradle'
repositories {
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.android.tools.build:gradle:$versions.gradlePluginVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$versions.kotlinVersion"
classpath 'io.github.gradle-nexus:publish-plugin:1.1.0'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
def outputDir = "android/build/outputs"
task clean(type: Delete) {
dependsOn(":GodotOpenXR:clean")
delete(rootProject.buildDir)
// Delete the contents of the outputs directory
delete(outputDir)
}
/**
* Generate the plugin binaries.
*/
task generatePluginBinary(type: Copy) {
dependsOn(":GodotOpenXR:assembleDebug")
dependsOn(":GodotOpenXR:assembleRelease")
from("android/build/outputs/aar")
into("$outputDir/pluginBin")
}
/**
* Generate the plugin native shared libraries.
*/
task generateSharedLibs(type: Copy) {
dependsOn(":GodotOpenXR:externalNativeBuildFullDebug")
dependsOn(":GodotOpenXR:externalNativeBuildFullRelease")
// Specify the base directory. All following 'into' targets will be relative
// to this directory.
into("$outputDir/sharedLibs")
// Copy the generated debug shared libs into the outputs directory
from("android/build/intermediates/cmake/fullDebug/obj") {
into("debug")
}
from("android/src/fullDebug/jniLibs") {
into("debug")
}
// Copy the generated release shared libs into the outputs directory
from("android/build/intermediates/cmake/fullRelease/obj") {
into("release")
}
from("android/src/fullRelease/jniLibs") {
into("release")
}
// Copy the 64bit generated debug shared libs into our plugin
// Note that our CI will distribute the runtime versions
from("android/build/intermediates/cmake/fullDebug/obj/arm64-v8a") {
into("../../../../demo/addons/godot-openxr/bin/android")
}
from("android/src/fullDebug/jniLibs/arm64-v8a") {
into("../../../../demo/addons/godot-openxr/bin/android")
}
}