forked from MobileGL-Dev/MobileGL
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
72 lines (66 loc) · 1.98 KB
/
Copy pathbuild.gradle
File metadata and controls
72 lines (66 loc) · 1.98 KB
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
apply plugin: 'com.android.library'
def mobileGlLogActiveLevel = {
(rootProject.findProperty('mobilegl.logLevel') ?: System.getenv('MOBILEGL_LOG_ACTIVE_LEVEL') ?: 'MOBILEGL_LOG_LEVEL_INFO') as String
}
def standalonePluginBuild = rootProject.name == 'MobileGLPlugin'
android {
namespace 'top.mobilegl.mobilegl'
compileSdk 34
defaultConfig {
minSdk 26
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
arguments "-DMOBILEGL_LOG_ACTIVE_LEVEL=${mobileGlLogActiveLevel()}"
}
}
}
buildTypes {
release {
minifyEnabled false
}
proguard {
minifyEnabled true
initWith debug
}
fordebug {
debuggable true
// Keep the APK debuggable (simpleperf --app, JDWP) but build the
// native library like a release: AGP maps debuggable build types to
// CMAKE_BUILD_TYPE=Debug, which compiles MobileGL at -O0 and makes
// every performance measurement on this flavor meaningless.
externalNativeBuild {
cmake {
arguments "-DCMAKE_BUILD_TYPE=RelWithDebInfo"
}
}
}
}
if (standalonePluginBuild) {
flavorDimensions 'profile'
productFlavors {
plugin {
dimension 'profile'
}
trace {
dimension 'profile'
externalNativeBuild {
cmake {
arguments '-DMOBILEGL_TRACE_ANGLE_VARIANTS=ON'
}
}
}
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
version "3.22.1"
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
ndkVersion '27.3.13750724'
}