forked from Kotlin/kotlinx.team.infra
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
89 lines (74 loc) · 2.79 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
import java.nio.file.Files
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-sam-with-receiver:$kotlin_version")
}
}
plugins {
id 'maven-publish'
id 'java-gradle-plugin'
id 'org.jetbrains.kotlin.jvm'
}
apply plugin: "kotlin-sam-with-receiver"
// Load `local.properties` file, if it exists. You can put your spaceUser and spaceToken values there, that file is ignored by git
def localPropertiesFile = file("$project.rootDir/local.properties")
if (Files.exists(localPropertiesFile.toPath())) {
localPropertiesFile.withReader { reader ->
def localProperties = new Properties()
localProperties.load(reader)
localProperties.each { prop -> project.ext.set(prop.key, prop.value) }
}
}
repositories {
mavenCentral()
gradlePluginPortal()
}
gradlePlugin {
plugins {
teamInfraPlugin {
id = "kotlinx.team.infra"
implementationClass = "kotlinx.team.infra.InfraPlugin"
}
}
}
sourceSets {
main {
kotlin.srcDirs = ['main/src']
java.srcDirs = ['main/src']
resources.srcDirs = ['main/resources']
}
test {
kotlin.srcDirs = ['test/src']
java.srcDirs = ['test/src']
resources.srcDirs = ['test/resources']
}
}
dependencies {
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib', version: kotlin_version
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk7', version: kotlin_version
api group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8', version: kotlin_version
// compile group: 'org.jetbrains.kotlin', name: 'kotlin-util-klib-metadata', version: kotlin_version
// compile group: 'org.jetbrains.kotlin', name: 'kotlin-util-klib', version: kotlin_version
// compile group: 'org.jetbrains.kotlin', name: 'kotlin-util-io', version: kotlin_version
compileOnly group: 'org.jetbrains.kotlin', name: 'kotlin-compiler', version: kotlin_version
compileOnly group: 'org.jetbrains.kotlin.multiplatform', name: 'org.jetbrains.kotlin.multiplatform.gradle.plugin', version: kotlin_version
implementation("org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.0.5")
implementation("org.ow2.asm:asm:6.0")
implementation("org.ow2.asm:asm-tree:6.0")
implementation group: 'com.googlecode.java-diff-utils', name: 'diffutils', version: '1.3.0'
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
testImplementation gradleTestKit()
testImplementation 'junit:junit:4.12'
}
samWithReceiver {
annotation("org.gradle.api.HasImplicitReceiver")
}
apply from: 'publish.gradle'
if (project.hasProperty("teamcity")) {
gradle.taskGraph.beforeTask {
println("##teamcity[progressMessage 'Gradle: ${it.project.path}:${it.name}']")
}
}