forked from meganz/android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
114 lines (102 loc) · 3.6 KB
/
build.gradle.kts
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
import mega.privacy.android.build.isServerBuild
plugins {
alias(plugin.plugins.kotlin.compose) apply false
alias(plugin.plugins.ksp) apply false
alias(plugin.plugins.mega.android.cicd)
alias(plugin.plugins.mega.android.release)
alias(plugin.plugins.jfrog.artifactory) apply false
alias(plugin.plugins.mega.artifactory.publish.convention) apply false
alias(plugin.plugins.de.mannodermaus.android.junit5) apply false
alias(plugin.plugins.jetbrains.kotlin.android) apply false
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
maven { url = uri("https://plugins.gradle.org/m2/") }
mavenCentral()
}
dependencies {
classpath(plugin.build.tools)
classpath(plugin.kotlin.gradle)
classpath(plugin.navigation.safeargs)
classpath(plugin.google.services)
classpath(plugin.hilt.android)
classpath(plugin.firebase.crashlytics)
classpath(plugin.firebase.performance)
classpath(plugin.firebase.app.distribution)
classpath(plugin.jacoco)
classpath(plugin.paparazzi)
classpath(plugin.jfrog)
classpath(plugin.junit5)
classpath(plugin.kotlin.gradle)
classpath(lib.kotlin.serialisation)
classpath("androidx.benchmark:benchmark-baseline-profile-gradle-plugin:1.2.4")
classpath("org.jfrog.buildinfo:build-info-extractor-gradle:${plugin.versions.jfrog.artifactory.get()}")
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url = uri("https://jitpack.io")
}
maven {
url =
uri("${System.getenv("ARTIFACTORY_BASE_URL")}/artifactory/mega-gradle/mega-sdk-android")
}
maven {
url =
uri("${System.getenv("ARTIFACTORY_BASE_URL")}/artifactory/mega-gradle/mobile-analytics")
}
maven {
url =
uri("${System.getenv("ARTIFACTORY_BASE_URL")}/artifactory/mega-gradle/core-ui")
}
maven {
url =
uri("${System.getenv("ARTIFACTORY_BASE_URL")}/artifactory/mega-gradle/dev-tools")
}
maven {
url =
uri("${System.getenv("ARTIFACTORY_BASE_URL")}/artifactory/mega-gradle/karma")
}
}
configurations.all {
resolutionStrategy.cacheDynamicVersionsFor(5, "minutes")
}
}
tasks.register("clean", Delete::class) {
delete(rootProject.layout.buildDirectory.get())
}
// Define versions in a single place
// App
extra["appVersion"] = "14.8"
// Sdk and tools
extra["compileSdkVersion"] = 35
extra["minSdkVersion"] = 26
extra["targetSdkVersion"] = 35
extra["buildTools"] = "35.0.0"
// Prebuilt MEGA SDK version
extra["megaSdkVersion"] = "20241121.091619-rel"
//JDK and Java Version
extra["jdk"] = "17"
extra["javaVersion"] = JavaVersion.VERSION_17
/**
* Checks whether to Suppress Warnings
*/
val shouldSuppressWarnings by extra(
fun(): Boolean = isServerBuild() && System.getenv("DO_NOT_SUPPRESS_WARNINGS") != "true"
)
tasks.register("runUnitTest") {
group = "Verification"
description = "Runs all unit tests same as CI/CD pipeline"
dependsOn(":domain:jacocoTestReport")
dependsOn(":data:testDebugUnitTestCoverage")
dependsOn(":app:createUnitTestCoverageReport")
dependsOn(":feature:devicecenter:testDebugUnitTestCoverage")
dependsOn(":feature:sync:testDebugUnitTestCoverage")
dependsOn(":shared:original-core-ui:testDebugUnitTestCoverage")
dependsOn(":legacy-core-ui:testDebugUnitTestCoverage")
}