-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
120 lines (93 loc) · 2.9 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
import de.itemis.mps.gradle.BuildLanguages
import de.itemis.mps.gradle.GenerateLibrariesXml
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
buildscript {
repositories {
mavenCentral()
maven { url 'https://projects.itemis.de/nexus/content/repositories/mbeddr' }
}
dependencies {
classpath 'de.itemis.mps:mps-gradle-plugin:1.7.286.963066e'
}
configurations.classpath {
resolutionStrategy.activateDependencyLocking()
}
}
plugins {
id "co.riiid.gradle" version "0.4.2"
}
apply plugin: 'base'
ext.dependencyRepositories = [
'https://projects.itemis.de/nexus/content/repositories/mbeddr',
]
def version = "0.5"
repositories {
for (repoUrl in project.dependencyRepositories) {
maven {
url repoUrl
}
}
mavenCentral()
}
ext.artifactsDir = new File(rootDir, 'artifacts')
ext.mpsDir = new File(artifactsDir, 'mps')
File scriptFile(String relativePath) {
new File("$rootDir/build/generated/$relativePath")
}
def mpsBuild = "2021.1.1"
// configs
configurations {
mps
ant_lib
}
dependencies {
mps "com.jetbrains:mps:$mpsBuild"
ant_lib "org.apache.ant:ant-junit:1.10.14"
}
dependencyLocking {
lockAllConfigurations()
}
ext.buildScriptClasspath = project.configurations.ant_lib.fileCollection({ true })
ext.defaultScriptArgs = ["-Dversion=$version", "-Dartifacts.root=${ext.artifactsDir.getAbsolutePath()}", "-Dbuild.dir=${rootProject.projectDir.absolutePath}"]
task resolveMps(type: Copy) {
dependsOn configurations.mps
from {
configurations.mps.resolve().collect { zipTree(it) }
}
into mpsDir
doFirst { delete mpsDir }
}
task allScripts(type: BuildLanguages, dependsOn: [resolveMps]){
group "generate scripts"
scriptArgs = defaultScriptArgs
scriptClasspath = buildScriptClasspath
script scriptFile('build-meta.xml')
}
task build_languages(type: BuildLanguages, dependsOn: allScripts) {
group "build"
description "builds all languages and plugins"
scriptArgs = defaultScriptArgs
scriptClasspath = buildScriptClasspath
script scriptFile('build-all.xml')
}
def releaseArtifacts = new File(artifactsDir, "ws.logv.mps.generator.editors")
.listFiles()
.findAll {it.name.endsWith("zip")}
.each {it.absolutePath}
github {
owner = 'coolya'
repo = 'Durchblick'
token = System.getenv().GITHUB_TOKEN != null ? System.getenv().GITHUB_TOKEN : "empty"
tagName = "v-$version"
targetCommitish = System.getenv().CI_COMMIT_SHA != null ? System.getenv().CI_COMMIT_SHA : "master"
name = "MPS Generator Editors $version"
body = ReleaseNotes.getReleaseNotes(file("RELEASE_NOTES.md"))
assets = releaseArtifacts
}
build.dependsOn build_languages
githubRelease.dependsOn build