Skip to content

Commit

Permalink
gradle intellij platform 2.* build migration CI issues.
Browse files Browse the repository at this point in the history
- upgrade spock to 2.* (to support groovy 3 as in IDEA dependencies)
- upgrade junit runtime to 5 (to support spock 2)
  • Loading branch information
yaronyam committed Sep 14, 2024
1 parent 1bb6b33 commit ebff036
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 42 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ jobs:
strategy:
fail-fast: false
matrix:
IDEA_VERSION: [ 2023.2, 2024.1, LATEST-EAP-SNAPSHOT ]
WITH_IDEA_PLUGINS: [ true, false ]
include:
- IDEA_VERSION: 2023.2
SCALA_PLUGIN_VERSION: 2023.2.23
Expand All @@ -24,9 +22,9 @@ jobs:
- IDEA_VERSION: 2024.1
SCALA_PLUGIN_VERSION: 2024.1.1
WITH_IDEA_PLUGINS: true
- IDEA_VERSION: 2024.1
SCALA_PLUGIN_VERSION: 2024.1.1
WITH_IDEA_PLUGINS: false
- IDEA_VERSION: 2024.2.1
SCALA_PLUGIN_VERSION: 2024.2.1
WITH_IDEA_PLUGINS: true
- IDEA_VERSION: LATEST-EAP-SNAPSHOT
SCALA_PLUGIN_VERSION: 2024.2.1
WITH_IDEA_PLUGINS: true
Expand Down
56 changes: 32 additions & 24 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ println "***********************************************************************
println " Running build for ideaVersion: $ideaVersion and scalaPluginVersion: $scalaPluginVersion with Groovy plugin ${groovyOn} and Scala plugin ${scalaOn}"
println "*****************************************************************************************************************************************************************"
def isRunInCI=Boolean.valueOf(System.getenv('CI'))
def testedProjects = subprojects + rootProject

repositories {
mavenCentral()
intellijPlatform {
Expand Down Expand Up @@ -85,6 +85,7 @@ allprojects {
includeNoLocationClasses = true
excludes = ["jdk.internal.*"]
}
useJUnitPlatform()
}
}

Expand Down Expand Up @@ -130,37 +131,44 @@ dependencies {
// "TemplateWordInPluginId,ForbiddenPluginIdPrefix"
// )
// }
testFramework(TestFrameworkType.Platform.INSTANCE)
// testFramework(TestFrameworkType.Platform.INSTANCE)
testFramework(TestFrameworkType.JUnit5.INSTANCE)
testFramework(TestFrameworkType.Plugin.Java.INSTANCE)
pluginModule(implementation(project(':testme-intellij-common')))
pluginModule(implementation(project(':testme-intellij-groovy')))
pluginModule(implementation(project(':testme-intellij-scala')))
}

testImplementation 'junit:junit:4.13.2'
implementation(project(':testme-intellij-common')) {
exclude group: 'com.jetbrains', module: 'ideaIC'
exclude group: 'org.jetbrains.plugins', module: 'junit'
exclude group: 'org.jetbrains.plugins', module: 'properties'
exclude group: 'org.jetbrains.plugins', module: 'Groovy'
}
implementation(project(':testme-intellij-groovy')) {
exclude group: 'com.jetbrains', module: 'ideaIC'
exclude group: 'org.jetbrains.plugins', module: 'junit'
exclude group: 'org.jetbrains.plugins', module: 'properties'
exclude group: 'org.jetbrains.plugins', module: 'Groovy'
}
implementation(project(':testme-intellij-scala')) {
exclude group: 'com.jetbrains', module: 'ideaIC'
exclude group: 'org.jetbrains.plugins', module: 'junit'
exclude group: 'org.jetbrains.plugins', module: 'properties'
exclude group: 'org.jetbrains.plugins', module: 'Groovy'
exclude group: 'org.jetbrains.plugins', module: 'Scala'
}

// implementation(project(':testme-intellij-common')) {
// exclude group: 'com.jetbrains', module: 'ideaIC'
// exclude group: 'org.jetbrains.plugins', module: 'junit'
// exclude group: 'org.jetbrains.plugins', module: 'properties'
// exclude group: 'org.jetbrains.plugins', module: 'Groovy'
// }
// implementation(project(':testme-intellij-groovy')) {
// exclude group: 'com.jetbrains', module: 'ideaIC'
// exclude group: 'org.jetbrains.plugins', module: 'junit'
// exclude group: 'org.jetbrains.plugins', module: 'properties'
// exclude group: 'org.jetbrains.plugins', module: 'Groovy'
// }
// implementation(project(':testme-intellij-scala')) {
// exclude group: 'com.jetbrains', module: 'ideaIC'
// exclude group: 'org.jetbrains.plugins', module: 'junit'
// exclude group: 'org.jetbrains.plugins', module: 'properties'
// exclude group: 'org.jetbrains.plugins', module: 'Groovy'
// exclude group: 'org.jetbrains.plugins', module: 'Scala'
// }
//
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'

testCompileOnly group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'
testImplementation 'org.mockito:mockito-core:4.3.1'
testImplementation("org.spockframework:spock-core:2.3-groovy-3.0")
testCompileOnly group: 'org.scala-lang', name: 'scala-library', version: '2.11.12'

testImplementation 'org.junit.jupiter:junit-jupiter:5.7.1'
testImplementation 'junit:junit:4.13.2'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine'
}

def javadocHeader = ""
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ pluginManagement {
}
}
rootProject.name = 'testme-intellij'
include 'testme-intellij-common', 'testme-intellij-groovy', 'testme-intellij-scala'
include ':testme-intellij-common', ':testme-intellij-groovy', ':testme-intellij-scala'

4 changes: 2 additions & 2 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
<idea-version since-build="232" until-build="241.*"/>
<depends>com.intellij.modules.java</depends>
<depends>JUnit</depends>
<depends optional="true" config-file="META-INF/plugin-groovy.xml">org.intellij.groovy</depends>
<depends optional="true" config-file="META-INF/plugin-scala.xml">org.intellij.scala</depends>
<depends optional="true" config-file="plugin-groovy.xml">org.intellij.groovy</depends>
<depends optional="true" config-file="plugin-scala.xml">org.intellij.scala</depends>
<extensions defaultExtensionNs="com.intellij">
<applicationConfigurable parentId="root" displayName="TestMe" id="preferences.TestMe" instance="com.weirddev.testme.intellij.ui.settings.TestMeConfigurable"/>
<projectConfigurable id="preferences.TestMe.templates" parentId="preferences.TestMe" displayName="TestMe Templates" provider="com.weirddev.testme.intellij.ui.template.TestTemplatesConfigurable$Provider"/>
Expand Down
10 changes: 5 additions & 5 deletions testme-intellij-groovy/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repositories {
}
}

intellijPlatform {
pluginConfiguration {
name = 'TestMe-groovy'
}
}
//intellijPlatform {
// pluginConfiguration {
// name = 'TestMe-groovy'
// }
//}

def enabledPlugins = ['com.intellij.java','org.intellij.groovy']
dependencies {
Expand Down
10 changes: 5 additions & 5 deletions testme-intellij-scala/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repositories {
}
}

intellijPlatform {
pluginConfiguration {
name = 'TestMe-scala'
}
}
//intellijPlatform {
// pluginConfiguration {
// name = 'TestMe-scala'
// }
//}

dependencies {
intellijPlatform {
Expand Down

0 comments on commit ebff036

Please sign in to comment.