forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
50 lines (46 loc) · 1.54 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.4.20'
ext.fragment_version = '1.2.0-rc01'
repositories {
google()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
classpath 'com.google.gms:google-services:4.3.3'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects{
afterEvaluate {
// kapt doesn't propagate source version properly so even if we set JDK to be 9, if we
// have a local JDK version of 9+, we see a dagger bug in generating annotations
// that only occurs in JDK 9+, this is the workaround:
// (Lots of useful information here: https://github.com/google/dagger/issues/1449)
if (project.hasProperty('kapt')) {
// Reference for 'kapt' DSL: https://kotlinlang.org/docs/reference/kapt.html#java-compiler-options
kapt {
// we expect this closure to run over a org.jetbrains.kotlin.gradle.plugin.KaptExtension
javacOptions {
option("-source", "8")
option("-target", "8")
}
}
}
}
}