Skip to content

Commit 1b6e397

Browse files
committed
build(model-api-gen): removed the gradle functionalTest
There is a separate project "model-api-gen-gradle-test" that does the same test. The gradle functionalTest is hard to debug, because all the generated files are deleted at the end of the test run. That's why this separate test project was added.
1 parent 134caac commit 1b6e397

File tree

98 files changed

+0
-53202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+0
-53202
lines changed
Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
/*
2-
* This file was generated by the Gradle 'init' task.
3-
*
4-
* This generated file contains a sample Gradle plugin project to get you started.
5-
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
6-
* User Manual available at https://docs.gradle.org/7.5.1/userguide/custom_plugins.html
7-
* This project uses @Incubating APIs which are subject to change.
8-
*/
91

102
plugins {
113
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
@@ -32,80 +24,10 @@ dependencies {
3224
implementation(project(":model-api"))
3325
}
3426

35-
// ------------- Download MPS for the functional test ------------------------------------------------------------------
36-
37-
val mps = configurations.create("mps")
38-
39-
dependencies {
40-
mps("com.jetbrains:mps:2021.3.+")
41-
}
42-
43-
val mpsDir = buildDir.resolve("mps")
44-
45-
val resolveMps by tasks.registering(Sync::class) {
46-
from(mps.resolve().map { zipTree(it) })
47-
into(mpsDir)
48-
}
49-
50-
val writeVersionFile by tasks.registering {
51-
val propertiesFile = projectDir.resolve("src/main/resources/modelix.core.version.properties")
52-
propertiesFile.parentFile.mkdirs()
53-
propertiesFile.writeText("""
54-
modelix.core.version=$version
55-
""".trimIndent())
56-
}
57-
tasks.named("processResources") {
58-
dependsOn(writeVersionFile)
59-
}
60-
61-
// ---------------------------------------------------------------------------------------------------------------------
62-
63-
testing {
64-
suites {
65-
// Configure the built-in test suite
66-
val test by getting(JvmTestSuite::class) {
67-
// Use Kotlin Test test framework
68-
useKotlinTest()
69-
}
70-
71-
// Create a new test suite
72-
val functionalTest by registering(JvmTestSuite::class) {
73-
useJUnit()
74-
75-
dependencies {
76-
// functionalTest test suite depends on the production code in tests
77-
implementation(project(":model-api-gen-gradle"))
78-
implementation(project(":model-api"))
79-
implementation(project(":model-api-gen"))
80-
implementation(project(":metamodel-export"))
81-
}
82-
83-
targets {
84-
all {
85-
// This test suite should run after the built-in test suite has run its tests
86-
testTask.configure { shouldRunAfter(test) }
87-
}
88-
}
89-
}
90-
}
91-
}
92-
9327
gradlePlugin {
9428
// Define the plugin
9529
val mpsMetaModel by plugins.creating {
9630
id = "org.modelix.model-api-gen"
9731
implementationClass = "org.modelix.metamodel.gradle.MetaModelGradlePlugin"
9832
}
9933
}
100-
101-
gradlePlugin.testSourceSets(sourceSets["functionalTest"])
102-
103-
tasks.named<Task>("check") {
104-
// Include functionalTest as part of the check lifecycle
105-
dependsOn(testing.suites.named("functionalTest"))
106-
}
107-
108-
tasks.named("functionalTest") {
109-
dependsOn(resolveMps)
110-
dependsOn(":metamodel-export:publish_metamodel-export_PublicationToMavenLocal")
111-
}

model-api-gen-gradle/src/functionalTest/kotlin/org/modelix/metamodel/gradle/MetaModelGradlePluginFunctionalTest.kt

Lines changed: 0 additions & 129 deletions
This file was deleted.

model-api-gen-gradle/src/functionalTest/resources/json/jetbrains.mps.baseLanguage.blTypes.json

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)