-
-
Notifications
You must be signed in to change notification settings - Fork 277
Expand file tree
/
Copy pathbuild.gradle
More file actions
67 lines (58 loc) · 2.54 KB
/
build.gradle
File metadata and controls
67 lines (58 loc) · 2.54 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '2.1.20'
repositories {
google()
// https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/
// jcenter() is no longer getting updates, instead using mavenCentral
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// add firebase plugins - will be conditionally applied in app/build.gradle
def taskNames = gradle.startParameter.taskNames.join(',').toLowerCase()
def apkBuild = taskNames.contains("full")
def fdroidBuild = taskNames.contains("fdroid")
// check for fdroidserver value is set in system env
def fdroidBuildServer = System.getenv("fdroidserver")
def isFdroidBuildServer = fdroidBuildServer != null && !fdroidBuildServer.isEmpty() && fdroidBuildServer != "null"
def deGoogled = !apkBuild || fdroidBuild || isFdroidBuildServer
println("app-task names: '$taskNames'")
println("app; deGoogled? $deGoogled (fdroidBuild: $fdroidBuild, fdroidBuildServer: $isFdroidBuildServer, apkBuild: $apkBuild)")
if (!deGoogled) {
classpath 'com.google.gms:google-services:4.4.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:3.0.6'
}
}
}
plugins {
id 'com.google.devtools.ksp' version '2.1.20-2.0.1' apply false
}
allprojects {
repositories {
google()
mavenCentral()
def firestackRepo = project.findProperty("firestackRepo") ?: "github"
if (firestackRepo == "jitpack") {
// jitpack.io/#celzero/firestack
maven { url 'https://jitpack.io' }
} else if (firestackRepo == "github") {
// maven.pkg.github.com/celzero/firestack
maven {
name = 'GitHubPackages'
url = uri("https://maven.pkg.github.com/celzero/firestack")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME_GITHUB")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN_GITHUB")
}
}
} else {
// ossrh: https://central.sonatype.com/artifact/com.celzero/firestack/
// no-op; mavenCentral is already included
}
}
}
tasks.register('clean', Delete) {
delete rootProject.buildDir
}