-
Notifications
You must be signed in to change notification settings - Fork 37
/
build.gradle.kts
99 lines (83 loc) · 2.66 KB
/
build.gradle.kts
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
96
97
98
99
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(sharedLibs.plugins.kotlin.jvm)
id("org.jetbrains.kotlin.plugin.serialization") version sharedLibs.versions.kotlin apply false
alias(sharedLibs.plugins.shadow)
}
allprojects {
apply {
plugin("java")
plugin("kotlin")
plugin("org.jetbrains.kotlin.plugin.serialization")
}
repositories {
maven("https://cache-redirector.jetbrains.com/intellij-repository/releases")
maven("https://cache-redirector.jetbrains.com/intellij-dependencies")
mavenCentral()
mavenLocal()
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
val manifestAttributes = mapOf("Main-Class" to "org.jetbrains.ide.diff.builder.MainKt")
tasks {
jar {
manifest {
attributes(manifestAttributes)
}
}
shadowJar {
manifest {
attributes(manifestAttributes)
}
archiveClassifier = "all"
}
}
val fatJar by tasks.registering(ShadowJar::class) {
dependsOn(tasks.shadowJar)
}
artifacts {
fatJar
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "11"
apiVersion = "1.4"
languageVersion = "1.4"
freeCompilerArgs = listOf("-Xjvm-default=enable")
}
}
dependencies {
runtimeOnly(sharedLibs.logback.classic)
testImplementation(sharedLibs.junit)
testImplementation(project(":"))
val structureVersion = "dev"
implementation(group = "org.jetbrains.intellij.plugins", name = "verifier-intellij", version = structureVersion)
implementation(group = "org.jetbrains.intellij.plugins", name = "verifier-cli", version = structureVersion)
implementation(group = "org.jetbrains.intellij.plugins", name = "structure-ide-classes", version = structureVersion)
implementation(sharedLibs.spullara.cliParser)
implementation("org.apache.commons:commons-text:1.13.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc")
}
val copyMockIdes by tasks.registering(Copy::class) {
dependsOn(
":mock-old-ide:prepareIde",
":mock-new-ide:prepareIde"
)
into(layout.buildDirectory.dir("mock-ides"))
val oldIde = copySpec {
from(project("mock-old-ide").layout.buildDirectory.dir("mock-ide"))
into("old-ide")
}
val newIde = copySpec {
from(project("mock-new-ide").layout.buildDirectory.dir("mock-ide"))
into("new-ide")
}
with(oldIde, newIde)
}
tasks.test {
dependsOn(copyMockIdes, copyMockIdes.get().outputs.files)
}