forked from openedx-unsupported/edx-app-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
80 lines (72 loc) · 2.92 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
import com.android.ddmlib.DdmPreferences
allprojects {
repositories {
// The order in which you list these repositories matter.
google()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url 'https://jitpack.io' }
maven { url "https://appboy.github.io/appboy-android-sdk/sdk" }
maven { url "https://appboy.github.io/appboy-segment-android/sdk" }
maven { url "https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1" }
}
project.apply from: "${rootDir}/constants.gradle"
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
project.apply from: "${rootDir}/constants.gradle"
repositories {
google()
mavenCentral() // This is the Maven Central repo
}
dependencies {
classpath "com.android.tools.build:gradle:$GRADLE_PLUGIN_VERSION"
classpath "com.google.gms:google-services:$gms_google_services"
// Add the dependency for the Performance Monitoring plugin
classpath 'com.google.firebase:perf-plugin:1.2.1' // Performance Monitoring plugin
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${KOTLIN_VERSION}"
// Firebase Crashlytics Gradle plugin.
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
classpath "com.google.dagger:hilt-android-gradle-plugin:${hilt_version}"
}
}
// task that creates 'artifacts' directory
task createBuildArtifactsDirectory { task ->
doLast {
def hashPipe = new ByteArrayOutputStream()
task.project.exec {
commandLine = ['git', 'rev-parse', '--verify', 'HEAD']
standardOutput = hashPipe
}
def destDir = "artifacts"
task.project.exec {
commandLine = ['mkdir', '-p', destDir]
}
}
}
// Copies unit test reports to the 'artifacts' directory
task copyUnitTestBuildArtifacts { task ->
doLast {
// copy unit test reports
def srcPath = "OpenEdXMobile/build/reports"
task.project.exec {
commandLine = ['cp', '-R', srcPath, 'artifacts']
}
}
}
copyUnitTestBuildArtifacts.dependsOn createBuildArtifactsDirectory
// Copies lint report to the 'artifacts' directory
task copyLintBuildArtifacts(type: Copy) {
from 'OpenEdXMobile/build/outputs'
into 'artifacts'
include 'lint-results*'
include 'lint-results*/**'
}
copyLintBuildArtifacts.dependsOn createBuildArtifactsDirectory
// Disables preDex which reduces the amount of memory required to build an APK. This is important
// for CI where there is a memory limit. PreDex is also not useful in CI where a new build is
// desired on every run.
project.ext.preDexLibs = !project.hasProperty('disablePreDex')
// Increases adb timeout for installing an apk. This tweak is need for slow adb installs on an
// emulator for CI.
DdmPreferences.setTimeOut(600000)