Skip to content

Commit

Permalink
Merge branch 'private-release/v2.0.0' into zowe-release/v2.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Sep 27, 2024
2 parents 70b8a9b + e1b3337 commit 9692898
Show file tree
Hide file tree
Showing 27 changed files with 990 additions and 651 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
product: ["IC-231","IC-233","IC-243"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
- product: "IC-243"
distribution: "zulu"
java: "21"
max-parallel: 10
fail-fast: false
outputs:
Expand Down Expand Up @@ -98,14 +101,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
product: ["IC-231","IC-233","IC-243"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
- product: "IC-243"
distribution: "zulu"
java: "21"
max-parallel: 10
fail-fast: false
steps:
Expand Down Expand Up @@ -158,14 +164,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
product: ["IC-231","IC-233","IC-243"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
- product: "IC-243"
distribution: "zulu"
java: "21"
max-parallel: 10
fail-fast: false
steps:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
product: ["IC-231","IC-233"]
product: ["IC-231","IC-233","IC-243"]
include:
- product: "IC-231"
distribution: "zulu"
java: "17"
- product: "IC-233"
distribution: "zulu"
java: "17"
- product: "IC-243"
distribution: "zulu"
java: "21"
max-parallel: 10
fail-fast: false
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
.idea
.intellijPlatform
/build
/ide_for_launch

Expand Down
174 changes: 90 additions & 84 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
*/

import org.jetbrains.changelog.Changelog
import org.jetbrains.intellij.tasks.ClasspathIndexCleanupTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import java.time.LocalDate
import java.time.ZoneId
import java.time.format.DateTimeFormatter
Expand All @@ -24,59 +23,102 @@ fun environment(key: String) = providers.environmentVariable(key)
fun dateValue(pattern: String): String =
LocalDate.now(ZoneId.of("Europe/Warsaw")).format(DateTimeFormatter.ofPattern(pattern))

plugins {
id("org.sonarqube") version "5.0.0.4638"
id("org.jetbrains.intellij") version "1.17.4"
id("org.jetbrains.changelog") version "2.2.1"
kotlin("jvm") version "1.9.22"
java
id("org.jetbrains.kotlinx.kover") version "0.8.3"
id("org.owasp.dependencycheck") version "10.0.4"
}

val sonarLinksCi: String by project
// https://github.com/kotest/kotest-intellij-plugin/blob/master/build.gradle.kts
data class PluginDescriptor(
val jvmTargetVersion: JavaVersion, // the Java version to use during the plugin build
val since: String, // earliest version string this is compatible with
val until: String, // latest version string this is compatible with, can be wildcard like 202.*
// https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
val sdkVersion: String, // the version string passed to the intellij sdk gradle plugin
val sourceFolder: String // used as the source root for specifics of this build
)

apply(plugin = "kotlin")
apply(plugin = "org.jetbrains.intellij")
apply(from = "gradle/sonar.gradle")
val plugins = listOf(
PluginDescriptor(
jvmTargetVersion = JavaVersion.VERSION_17,
since = properties("pluginSinceBuild").get(),
until = "232.*",
sdkVersion = "2023.1.7",
sourceFolder = "IC-231"
),
PluginDescriptor(
jvmTargetVersion = JavaVersion.VERSION_17,
since = "233.11799",
until = "242.*",
sdkVersion = "2023.3",
sourceFolder = "IC-233"
),
PluginDescriptor(
jvmTargetVersion = JavaVersion.VERSION_21,
since = "243.12818",
until = properties("pluginUntilBuild").get(),
sdkVersion = "243-EAP-SNAPSHOT",
sourceFolder = "IC-243"
)
)
val productName = System.getenv("PRODUCT_NAME") ?: "IC-231"
val descriptor = plugins.first { it.sourceFolder == productName }

group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
val remoteRobotVersion = "0.11.23"
val okHttp3Version = "4.12.0"
val kotestVersion = "5.9.1"
val retrofit2Vertion = "2.11.0"
val junitVersion = "5.10.3"
val junitVersion = "5.11.1"
val mockkVersion = "1.13.12"
val ibmMqVersion = "9.4.0.0"
val jGraphTVersion = "1.5.2"
val zoweKotlinSdkVersion = "0.5.0"
val javaKeytarVersion = "1.0.0"

plugins {
id("org.sonarqube") version "5.0.0.4638"
id("org.jetbrains.intellij.platform") version "2.1.0"
id("org.jetbrains.changelog") version "2.2.1"
kotlin("jvm") version "1.9.22"
java
id("org.jetbrains.kotlinx.kover") version "0.8.3"
id("org.owasp.dependencycheck") version "10.0.4"
}

repositories {
mavenCentral()
flatDir {
dirs("libs")
}
maven {
url = uri("https://zowe.jfrog.io/zowe/libs-release")
}
maven {
url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies")
metadataSources {
mavenPom()
artifact()
ignoreGradleMetadataRedirection()
flatDir {
dir("libs")
}
}
intellijPlatform {
defaultRepositories()
jetbrainsRuntime()
}
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = descriptor.jvmTargetVersion
targetCompatibility = descriptor.jvmTargetVersion
}

kotlin {
compilerOptions {
jvmToolchain(JavaLanguageVersion.of(descriptor.jvmTargetVersion.toString()).asInt())
}
}

dependencies {
intellijPlatform {
// intellijIdeaCommunity(descriptor.sdkVersion)
// TO TEST EAP:
intellijIdeaCommunity(descriptor.sdkVersion, useInstaller = false)
jetbrainsRuntime()
instrumentationTools()
testFramework(TestFrameworkType.Plugin.Java)
}
implementation(group = "com.squareup.retrofit2", name = "retrofit", version = retrofit2Vertion)
implementation("com.squareup.retrofit2:converter-gson:$retrofit2Vertion")
implementation("com.squareup.retrofit2:converter-scalars:$retrofit2Vertion")
Expand All @@ -95,46 +137,15 @@ dependencies {
testImplementation("com.squareup.okhttp3:mockwebserver:$okHttp3Version")
testImplementation("com.squareup.okhttp3:okhttp-tls:$okHttp3Version")
testImplementation("com.squareup.okhttp3:logging-interceptor:$okHttp3Version")
testImplementation("com.intellij.remoterobot:ide-launcher:$remoteRobotVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitVersion")
testImplementation("com.intellij.remoterobot:ide-launcher:$remoteRobotVersion")
}

data class PluginDescriptor(
val since: String, // earliest version string this is compatible with
val until: String, // latest version string this is compatible with, can be wildcard like 202.*
// https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
val sdkVersion: String, // the version string passed to the intellij sdk gradle plugin
val sourceFolder: String, // used as the source root for specifics of this build
val deps: List<String> // dependent plugins of this plugin
)

val plugins = listOf(
PluginDescriptor(
since = properties("pluginSinceBuild").get(),
until = "232.*",
sdkVersion = "IC-2023.1.7",
sourceFolder = "IC-231",
deps = listOf("java", "org.jetbrains.plugins.gradle", "org.jetbrains.kotlin")
),
PluginDescriptor(
since = "233.11799",
until = properties("pluginUntilBuild").get(),
sdkVersion = "IC-2023.3",
sourceFolder = "IC-233",
deps = listOf("java", "org.jetbrains.plugins.gradle", "org.jetbrains.kotlin")
)
)
val productName = System.getenv("PRODUCT_NAME") ?: "IC-231"
val descriptor = plugins.first { it.sourceFolder == productName }

intellij {
version.set(descriptor.sdkVersion)
plugins.addAll(*descriptor.deps.toTypedArray())
// !Development only!
// downloadSources.set(true)
// In Settings | Advanced Settings enable option Download sources in section Build Tools. Gradle.
// Then invoke Reload All Gradle Projects action from the Gradle tool window.
intellijPlatform {
pluginConfiguration {
version = "${properties("pluginVersion").get()}-${descriptor.since.substringBefore(".")}"
}
}

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
Expand Down Expand Up @@ -171,6 +182,7 @@ kover {
classes(providers.provider { "org.zowe.explorer.*" })
}
excludes {
classes(providers.provider { "org.zowe.explorer.vfs.MFVFileCreateEvent" })
classes(providers.provider { "org.zowe.explorer.vfs.MFVFilePropertyChangeEvent" })
}
}
Expand All @@ -186,19 +198,11 @@ tasks {
gradleVersion = properties("gradleVersion").get()
}

withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
languageVersion = org.jetbrains.kotlin.config.LanguageVersion.LATEST_STABLE.versionString
}
}

withType<Copy> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

patchPluginXml {
version.set("${properties("pluginVersion").get()}-${descriptor.since.substringBefore(".")}")
sinceBuild.set(descriptor.since)
untilBuild.set(descriptor.until)

Expand All @@ -220,12 +224,12 @@ tasks {
)
}

withType<ClasspathIndexCleanupTask> {
onlyIf {
gradle.startParameter.taskNames.contains("test")
}
dependsOn(compileTestKotlin)
}
// withType<ClasspathIndexCleanupTask> {
// onlyIf {
// gradle.startParameter.taskNames.contains("test")
// }
// dependsOn(compileTestKotlin)
// }

//
// withType<ClasspathIndexCleanupTask> {
Expand Down Expand Up @@ -265,7 +269,7 @@ tasks {
if (desc.parent == null) { // will match the outermost suite
val output =
"Results: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, " +
"${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
"${result.failedTestCount} failed, ${result.skippedTestCount} skipped)"
val fileName = "./build/reports/tests/${result.resultType}.txt"
File(fileName).writeText(output)
}
Expand Down Expand Up @@ -318,14 +322,16 @@ tasks {
)
}

downloadRobotServerPlugin {
version.set(remoteRobotVersion)
}
// TODO: fix
// downloadRobotServerPlugin {
// version.set(remoteRobotVersion)
// }

runIdeForUiTests {
systemProperty("idea.trust.all.projects", "true")
systemProperty("ide.show.tips.on.startup.default.value", "false")
}
// TODO: fix
// runIdeForUiTests {
// systemProperty("idea.trust.all.projects", "true")
// systemProperty("ide.show.tips.on.startup.default.value", "false")
// }
}

/**
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pluginSinceBuild=231.9423
pluginUntilBuild=
# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion=8.7
# UI tests setup
systemProp.ideLaunchFolder=".\\ide_for_launch"
systemProp.forMainframePath="build\\distributions\\for-mainframe-2.0.0-IC-2023.1.zip"
systemProp.remoteRobotUrl="http://127.0.0.1"
Expand Down
Loading

0 comments on commit 9692898

Please sign in to comment.