forked from square/okio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
95 lines (86 loc) · 3.36 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
buildscript {
// If false - JS targets will not be configured in multiplatform projects.
ext.kmpJsEnabled = Boolean.parseBoolean(System.getProperty('kjs', 'true'))
// If false - Native targets will not be configured in multiplatform projects.
ext.kmpNativeEnabled = Boolean.parseBoolean(System.getProperty('knative', 'true'))
ext.versions = [
'kotlin': '1.4.10',
'jmhPlugin': '0.5.0',
'animalSnifferPlugin': '1.5.0',
'dokka': '1.4.0-rc',
'jmh': '1.23',
'animalSniffer': '1.16',
'junit': '4.12',
'assertj': '1.7.0',
'shadowPlugin': '5.2.0',
'ktlintPlugin': '8.2.0',
'bndPlugin': '5.1.2'
]
ext.deps = [
'kotlin': [
'gradlePlugin': "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
'stdLib': [
'common': "org.jetbrains.kotlin:kotlin-stdlib-common",
'jdk8': "org.jetbrains.kotlin:kotlin-stdlib-jdk8",
'jdk7': "org.jetbrains.kotlin:kotlin-stdlib-jdk7",
'jdk6': "org.jetbrains.kotlin:kotlin-stdlib",
'js': "org.jetbrains.kotlin:kotlin-stdlib-js",
],
'test': [
'common': "org.jetbrains.kotlin:kotlin-test-common",
'annotations': "org.jetbrains.kotlin:kotlin-test-annotations-common",
'jdk': "org.jetbrains.kotlin:kotlin-test-junit",
'js': "org.jetbrains.kotlin:kotlin-test-js",
],
],
'jmh': [
'gradlePlugin': "me.champeau.gradle:jmh-gradle-plugin:${versions.jmhPlugin}",
'core': "org.openjdk.jmh:jmh-core:${versions.jmh}",
'generator': "org.openjdk.jmh:jmh-generator-annprocess:${versions.jmh}",
],
'animalSniffer': [
'gradlePlugin': "ru.vyarus:gradle-animalsniffer-plugin:${versions.animalSnifferPlugin}",
'annotations': "org.codehaus.mojo:animal-sniffer-annotations:${versions.animalSniffer}",
],
'japicmp': 'me.champeau.gradle:japicmp-gradle-plugin:0.2.8',
'dokka': "org.jetbrains.dokka:dokka-gradle-plugin:${versions.dokka}",
'shadow': "com.github.jengelman.gradle.plugins:shadow:${versions.shadowPlugin}",
'ktlint': "org.jlleitschuh.gradle:ktlint-gradle:${versions.ktlintPlugin}",
'bnd': "biz.aQute.bnd:biz.aQute.bnd.gradle:${versions.bndPlugin}",
'test': [
'junit': "junit:junit:${versions.junit}",
'assertj': "org.assertj:assertj-core:${versions.assertj}",
]
]
dependencies {
classpath deps.kotlin.gradlePlugin
classpath deps.animalSniffer.gradlePlugin
classpath deps.japicmp
classpath deps.dokka
classpath deps.shadow
classpath deps.jmh.gradlePlugin
classpath deps.ktlint
classpath deps.bnd
// https://github.com/melix/japicmp-gradle-plugin/issues/36
classpath 'com.google.guava:guava:28.2-jre'
}
repositories {
mavenCentral()
gradlePluginPortal()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
}
// when scripts are applied the buildscript classes are not accessible directly therefore we save the class here to make it accessible
ext.bndBundleTaskConventionClass = aQute.bnd.gradle.BundleTaskConvention
allprojects {
group = GROUP
version = VERSION_NAME
}
subprojects {
repositories {
mavenCentral()
jcenter()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
apply plugin: "org.jlleitschuh.gradle.ktlint"
}