-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
56 lines (45 loc) · 1.46 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
import de.itemis.mps.gradle.BuildLanguages
buildscript {
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
}
repositories {
maven{url = uri("https://projects.itemis.de/nexus/content/repositories/mbeddr")}
mavenCentral()
}
dependencies {
"classpath"(group = "de.itemis.mps", name = "mps-gradle-plugin", version = "1.4.+")
}
}
repositories{
maven{
url = uri("https://projects.itemis.de/nexus/content/repositories/mbeddr")
}
mavenCentral()
}
val version="2020.3.+"
val mpsHomeDir = file("$buildDir/mps")
val mbeddrDir = file("$buildDir/mbeddr")
val mps = configurations.create("mps")
val mbeddr = configurations.create("mbeddr")
val ant_lib = configurations.create("ant_lib")
dependencies {
mps("com.jetbrains:mps:$version")
mbeddr("com.mbeddr:mbeddr:feature-doc-markdown.$version")
ant_lib("org.apache.ant:ant-junit:1.10.1")
}
val resolveMps = tasks.register<Copy>("resolveMps") {
from(mps.resolve().map {zipTree(it)})
into(mpsHomeDir)
}
val resolveMbeddr = tasks.register<Copy>("resolveMbeddr") {
from(mbeddr.resolve().map { zipTree(it) })
into(mbeddrDir)
}
ext["itemis.mps.gradle.ant.defaultScriptClasspath"] = project.configurations["ant_lib"].fileCollection({true})
val buildMarkdownDemo = tasks.register<BuildLanguages>("buildMarkdownDemo") {
dependsOn(resolveMps)
dependsOn(resolveMbeddr)
script = file("$buildDir/scripts/build.xml")
}
defaultTasks.add(buildMarkdownDemo.name)