-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
69 lines (61 loc) · 1.95 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
buildscript {
ext.kotlin_version = '1.9.22'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
project.android {
// Fix for:
//
// Namespace not specified. Specify a namespace in the module's build file.
//
// Source: https://stackoverflow.com/questions/76108428/how-do-i-fix-namespace-not-specified-error-in-android-studio
if (namespace == null) {
namespace project.group
}
}
}
// Fix for this exception in the receive_sharing_intent plugin:
//
// Inconsistent JVM-target compatibility detected for
// tasks 'compileDebugJavaWithJavac' (1.8) and 'compileDebugKotlin' (17).
//
// TODO: remove when receive_sharing_intent publishes a version that does this by
// itself.
if (project.name == 'receive_sharing_intent') {
project.android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlin {
jvmToolchain(17)
}
}
}
}
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}