14
14
* limitations under the License.
15
15
*/
16
16
17
- import org.modelix.model.server.Main
18
-
19
- buildscript {
20
- val modelixCoreVersion: String = file(" ../version.txt" ).readText()
21
- dependencies {
22
- classpath(" org.modelix:model-server:$modelixCoreVersion " )
23
- classpath(" org.modelix:graph-lang-api:$modelixCoreVersion " )
24
- }
25
- }
26
-
27
17
plugins {
28
18
alias(libs.plugins.kotlin.jvm)
29
19
id(" org.modelix.bulk-model-sync" )
@@ -34,19 +24,34 @@ val modelixCoreVersion: String = file("../version.txt").readText()
34
24
version = modelixCoreVersion
35
25
36
26
repositories {
37
- mavenLocal()
38
- maven { url = uri(" https://repo.maven.apache.org/maven2" ) }
39
- maven { url = uri(" https://plugins.gradle.org/m2/" ) }
40
- mavenCentral()
41
- maven { url = uri(" https://artifacts.itemis.cloud/repository/maven-mps/" ) }
27
+ val modelixRegex = " org\\ .modelix.*"
28
+ mavenLocal {
29
+ content {
30
+ includeGroupByRegex(modelixRegex)
31
+ }
32
+ }
33
+ gradlePluginPortal {
34
+ content {
35
+ excludeGroupByRegex(modelixRegex)
36
+ }
37
+ }
38
+ maven {
39
+ url = uri(" https://artifacts.itemis.cloud/repository/maven-mps/" )
40
+ content {
41
+ includeGroupByRegex(modelixRegex)
42
+ includeGroup(" com.jetbrains" )
43
+ }
44
+ }
45
+ mavenCentral {
46
+ content {
47
+ excludeGroupByRegex(modelixRegex)
48
+ }
49
+ }
42
50
}
43
51
44
- val mps by configurations.creating
45
- val mpsDir = project.layout.buildDirectory.dir(" mps" ).get().asFile.apply { mkdirs() }
46
52
val kotlinGenDir = project.layout.buildDirectory.dir(" metamodel/kotlin" ).get().asFile.apply { mkdirs() }
47
53
48
54
dependencies {
49
- mps(" com.jetbrains:mps:2021.2.5" )
50
55
implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.2" )
51
56
implementation(" org.modelix:model-server:$modelixCoreVersion " )
52
57
implementation(" org.modelix:model-api-gen-runtime:$modelixCoreVersion " )
@@ -74,12 +79,7 @@ tasks.register("runModelServer", JavaExec::class) {
74
79
75
80
classpath = sourceSets[" main" ].runtimeClasspath
76
81
mainClass.set(" org.modelix.model.server.Main" )
77
- args(" -inmemory" )
78
- }
79
-
80
- val resolveMps by tasks.registering(Copy ::class ) {
81
- from(mps.resolve().map { zipTree(it) })
82
- into(mpsDir)
82
+ args(" -inmemory" , " -port" , " 28309" )
83
83
}
84
84
85
85
val repoDir = project.layout.buildDirectory.dir(" test-repo" ).get().asFile
@@ -89,32 +89,32 @@ val copyTestRepo by tasks.registering(Sync::class) {
89
89
into(repoDir)
90
90
}
91
91
92
+ mpsBuild {
93
+ mpsVersion(" 2021.2.5" )
94
+ }
95
+
92
96
modelSync {
93
- dependsOn(resolveMps)
94
97
dependsOn(copyTestRepo)
95
98
direction(" testPush" ) {
96
- org.modelix.model.sync.bulk.gradle.test.GraphLanguagesHelper .registerAll()
97
99
includeModule(" GraphSolution" )
98
100
fromLocal {
99
- mpsHome = mpsDir
100
101
mpsHeapSize = " 2g"
101
102
repositoryDir = repoDir
102
103
}
103
104
toModelServer {
104
- url = " http://0.0.0.0: ${ Main . DEFAULT_PORT } /v2"
105
+ url = " http://localhost:28309 /v2"
105
106
repositoryId = " ci-test"
106
107
branchName = " master"
107
108
}
108
109
}
109
110
direction(" testPull" ) {
110
111
includeModule(" GraphSolution" )
111
112
fromModelServer {
112
- url = " http://0.0.0.0: ${ Main . DEFAULT_PORT } /v2"
113
+ url = " http://localhost:28309 /v2"
113
114
repositoryId = " ci-test"
114
115
branchName = " master"
115
116
}
116
117
toLocal {
117
- mpsHome = mpsDir
118
118
repositoryDir = repoDir
119
119
}
120
120
}
0 commit comments