forked from SceneView/sceneview-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
123 lines (105 loc) · 4.18 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
plugins {
id 'com.android.library'
id 'kotlin-android'
id 'filament-tools-plugin'
id 'org.jetbrains.dokka'
}
// *************************************************************************************************
// Filament Plugin
// *************************************************************************************************
//
// Needed if you want to generate Materials, Indirect Light (IBL) and Skyboxes.
//
// 1) Copy/paste the /buildSrc dir into your project root folder
// 2) Copy/paste the plugins line above (plugins: { id 'filament-tools-plugin' }) and bellow into
// your app/module build.gradle
// 3) Download the Filament tools release archive for your development desktop:
// Filament release download: https://github.com/google/filament/releases
// (Choose the corresponding version to the filament_version bellow)
// 4) Copy/paste the Filament Plugin part from the gradle.properties file to your project
// 5) Sync Gradle and clean your project
if (project.properties['filamentPluginEnabled']?.toBoolean()) {
filamentTools {
// Material generation: .mat -> .filamat
materialInputDir = project.layout.projectDirectory.dir("src/main/materials")
materialOutputDir = project.layout.projectDirectory.dir("src/main/assets/materials")
// IBL and Skybox generation: .hdr -> _ibl.ktx and _skybox.ktx
iblInputDir = project.layout.projectDirectory.dir("src/main/environments")
iblOutputDir = project.layout.projectDirectory.dir("src/main/assets/environments")
iblFormat = "ktx"
}
clean.doFirst {
delete "src/main/assets/materials"
delete "src/main/assets/environments"
}
}
// *************************************************************************************************
group = GROUP
version = VERSION_NAME
android {
namespace 'io.github.sceneview'
compileSdk 34
defaultConfig {
minSdk 28
targetSdk 34
consumerProguardFiles 'consumer-rules.pro'
buildConfigField 'String', 'VERSION_NAME', "\"${project.properties['VERSION_NAME']}\""
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0-alpha02"
}
// Preserve compression of filament files
androidResources {
noCompress 'filamat', 'ktx'
}
}
dependencies {
// Kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
api "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4"
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
// kotlin-math
api 'dev.romainguy:kotlin-math:1.5.3'
// Filament
def filament_version = '1.36.0'
api "com.google.android.filament:filament-android:$filament_version"
api "com.google.android.filament:gltfio-android:$filament_version"
api "com.google.android.filament:filament-utils-android:$filament_version"
// AndroidX
implementation "androidx.annotation:annotation:1.6.0"
api "androidx.lifecycle:lifecycle-common-java8:2.6.1"
api "androidx.lifecycle:lifecycle-extensions:2.2.0"
// Compose
implementation "androidx.compose.ui:ui:1.5.0"
implementation "androidx.compose.foundation:foundation:1.5.0"
// Android KTX
api "androidx.core:core-ktx:1.10.1"
api "androidx.fragment:fragment-ktx:1.6.1"
api "androidx.lifecycle:lifecycle-runtime-ktx:2.6.1"
// Fuel (Http)
implementation "com.github.kittinunf.fuel:fuel:2.3.1"
implementation "com.github.kittinunf.fuel:fuel-android:2.3.1"
implementation "com.github.kittinunf.fuel:fuel-coroutines:2.3.1"
}
apply plugin: "com.vanniktech.maven.publish"