forked from TalbotGooday/AndroidPdfViewer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
63 lines (54 loc) · 1.62 KB
/
build.gradle
File metadata and controls
63 lines (54 loc) · 1.62 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
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.9.1'
}
}
allprojects {
ext.applyForPlugin = { String plugin, Action<Project> action ->
applyForPlugins([plugin], action)
}
ext.applyForPlugins = { Iterable<String> plugins, Action<Project> action ->
for (String plugin : plugins) {
if (project.plugins.hasPlugin(plugin)) {
action.call(project)
} else {
project.plugins.withId(plugin, {
action.call(project)
})
}
}
}
repositories {
google()
mavenCentral()
maven { url = 'https://jitpack.io' }
}
}
subprojects {
def kotlinVersion = "2.0.0"
//noinspection ConfigurationAvoidance
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
if (details.requested.name.startsWith('kotlin-stdlib')) {
details.because "Enforce a single Kotlin version ($kotlinVersion)."
details.useVersion kotlinVersion
}
}
}
}
applyForPlugin('java') {
java {
sourceCompatibility JavaVersion.toVersion(JavaVersion.VERSION_11)
targetCompatibility JavaVersion.toVersion(JavaVersion.VERSION_11)
toolchain {
languageVersion = JavaVersion.toVersion(JavaVersion.VERSION_17)
}
}
}
}