-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
57 lines (51 loc) · 2.09 KB
/
build.gradle
File metadata and controls
57 lines (51 loc) · 2.09 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.1'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0'
classpath 'com.google.gms:google-services:4.4.0'
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.7.5'
}
}
plugins {
id 'com.android.application' version '8.1.1' apply false
id 'com.android.library' version '8.1.1' apply false
id 'org.jetbrains.kotlin.android' version '1.9.0' apply false
id 'com.google.gms.google-services' version '4.4.0' apply false
id 'androidx.navigation.safeargs.kotlin' version '2.7.5' apply false
}
// Add a task to accept licenses
allprojects {
repositories {
google()
mavenCentral()
// Add JCenter repository for Rajawali
jcenter()
// Add GitHub Packages for Rajawali
maven { url 'https://jitpack.io' }
}
// AGP automatically optimizes dexing process - removed dexOptions
}
// Automatically accept SDK licenses
tasks.register('acceptLicenses') {
doLast {
// Create the licenses directory
def sdkDir = System.getenv("ANDROID_SDK_ROOT") ?: System.getenv("ANDROID_HOME") ?: "/nix/store/android-sdk"
def licensesDir = new File(sdkDir, "licenses")
licensesDir.mkdirs()
// Accept all licenses
new File(licensesDir, "android-sdk-license").text = "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e\n24333f8a63b6825ea9c5514f83c2829b004d1fee"
new File(licensesDir, "android-sdk-preview-license").text = "84831b9409646a918e30573bab4c9c91346d8abd"
new File(licensesDir, "google-gdk-license").text = "33b6a2b64607f11b759f320ef9dff4ae5c47d97a"
}
}
// Run the acceptLicenses task before any build tasks
tasks.whenTaskAdded { task ->
if (task.name.startsWith('compile') || task.name.startsWith('assemble')) {
task.dependsOn 'acceptLicenses'
}
}