From 64a92b791412b28e0aaec231a19eadea773ebe46 Mon Sep 17 00:00:00 2001 From: cschar Date: Sat, 8 Jun 2024 23:00:35 -0400 Subject: [PATCH] feature/2024.1 update (#22) * update * update * update versions --- CHANGELOG.md | 10 +- README_dev_notes.md | 179 ++++++---- build.gradle.kts | 34 +- build.gradle.kts.BAK | 337 ------------------ gradle.properties | 21 +- gradle/wrapper/gradle-wrapper.properties | 2 +- .../GitPackLoaderProgressMonitor.java | 5 + .../com/cschar/pmode3/PowerMode3Test.java | 29 +- 8 files changed, 164 insertions(+), 453 deletions(-) delete mode 100644 build.gradle.kts.BAK diff --git a/CHANGELOG.md b/CHANGELOG.md index 9375bf4..7d91f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,11 +3,15 @@ # power-mode-zeranthium Changelog ## [Unreleased] + +## [3.3.0] - 2024-05-18 +- 2024.1 update + +## [3.2.0] - 2023-03-22 - 2023.1 update - basic particles now show on first time startup - disable lizard on first time startup - ## [3.1.0] - 2023-03-13 - 2022.3 update - quieter logs @@ -28,7 +32,9 @@ ### Added - Initial scaffold created from [IntelliJ Platform Plugin Template](https://github.com/JetBrains/intellij-platform-plugin-template) -[Unreleased]: https://github.com/cschar/power-mode-zeranthium/compare/v3.1.0...HEAD +[Unreleased]: https://github.com/cschar/power-mode-zeranthium/compare/v3.3.0...HEAD +[3.3.0]: https://github.com/cschar/power-mode-zeranthium/compare/v3.2.0...v3.3.0 +[3.2.0]: https://github.com/cschar/power-mode-zeranthium/compare/v3.1.0...v3.2.0 [3.1.0]: https://github.com/cschar/power-mode-zeranthium/compare/v3.0.0...v3.1.0 [3.0.0]: https://github.com/cschar/power-mode-zeranthium/compare/v2.6.0...v3.0.0 [2.6.0]: https://github.com/cschar/power-mode-zeranthium/compare/v2.5.1...v2.6.0 diff --git a/README_dev_notes.md b/README_dev_notes.md index ddf63ce..c796d37 100644 --- a/README_dev_notes.md +++ b/README_dev_notes.md @@ -2,16 +2,80 @@ # Deploying new version - 1. Change version in build.gradle - - make actual change in gradle.properties - - change pluginVersion - - update pluginUntilBuild - +``` + 1. Change versions + - 1.1. make actual change in gradle.properties: + - 1.1.1 change pluginVersion + - 1.1.2 update pluginSinceBuild & pluginUntilBuild + ex: to cover 2023.2 -> 2024.1.* + pluginSinceBuild = 232 + pluginUntilBuild = 241.* + + - 1.1.3 update pluginVerifierIdeVersions + + 2. Update change notes plugin in build.gradle - update CHANGELOG.md - - 3. build ```./gradlew :buildPlugin --info``` - 4. publish ```./gradlew :publishPlugin --no-configuration-cache ``` + + 3. build + ./gradlew :buildPlugin --info + + 4. run + ./gradlew :runPlugin + + 5. test + ./gradlew :test --info + + . publish + ./gradlew :publishPlugin --no-configuration-cache + +``` + + + +## when setting up on a new computer... + +step 1. in File -> project structure -> SDKs ... '+' icon ---> add the IntelliJP Platform Plugin SDK +step 2. set that SDK as the project SDK to have the external library defined to access all intellij.openapi stuff + + +## testing + +`./gradlew :test --info` +- run a single test + `./gradlew :test --tests "com.cschar.pmode3.uitest.WriteTextJavaTest.writeSomeText"` + `./gradlew :test --tests "com.cschar.pmode3.GSONTest"` + +## testing ui + +- in 1 terminal run + `./gradlew :clean :runIdeForUiTests` + `./gradlew :clean :runIdeForUiTests --args="C:\\Users\\codywin\\IdeaProjects\\untitled13\\src\\App22336.kt"` + + then open `http://localhost:8082/` to check UI structure + +- in another terminal + all tests: `TEST_TYPE=UI ./gradlew :test` + single test class: +- `TEST_TYPE=UI ./gradlew :test --tests "com.cschar.pmode3.uitest.OpenSettingsJavaTest"` + single testcase +- `TEST_TYPE=UI ./gradlew :test --info --tests "com.cschar.pmode3.uitest.OpenSettingsJavaTest.opens_project"` +- + +#### testing the demo repo for ui-robot test + +terminal 1: +./gradlew ui-test-example:clean ui-test-example:runIdeForUiTests & +`./gradlew ui-test-example:clean ui-test-example:runIdeForUiTests --args="C:\\Users\\codywin\\IdeaProjects\\untitled13\\src\\App22336.kt"` +terminal2 +./gradlew ui-test-example:test --tests "SayHelloJavaTest" + + +## for example reference of test code +https://github.com/JetBrains/gradle-intellij-plugin/tree/master/examples/simple-plugin/src/test/java/org/intellij/examples/simple/plugin +and maybe.. +https://github.com/JetBrains/intellij-sdk-code-samples/ + # to delete ide-sandbox settings rm `./build/idea-sandbox/config/options/power.mode.3.Zeranthium.xml` @@ -23,6 +87,32 @@ add in Help > diagnostic Tools > Debug Log Settings +---------------------------------------------------------------- + +# Troubleshooting + +``` +- If serialized options are messed up +--- delete build/idea-sandbox/config/options/power.mode3.xml + +``` + +## runIdeForUiTest gotcha +make sure no file is open inside the ./build folder, :clean and :runIdeForUiTest will break + + +## Gradle dev env +in intellij run configurations make an empty gradle config with these args to intended project file +runIde --args="C:\\path\\to\\my\\project\\file\\App22336.kt" + +## Upgrading Gradle +When upgrading gradle... (to make ./gradlew use a diff version on commadnline...) +go into gradle/wrapper/gradle-wrapper.properties, and change the URL from which it downloads the version + + +---------------------------------------------------------------- + + # logo design -- SVG editor for logo here: @@ -31,18 +121,16 @@ https://editor.method.ac/ # any new images added, make sure to run through quant image compression https://pngquant.org/ -# LICENSING ... +# LICENSING ... audio code is LGPL: https://stackoverflow.com/questions/6045384/playing-mp3-and-wav-in-java https://opensource.stackexchange.com/questions/5175/including-untouched-lgpl-library-in-a-mit-licenced-project?rq=1 https://opensource.stackexchange.com/questions/7904/can-your-mit-library-use-an-lgpl-library?rq=1 - - https://dzone.com/articles/the-lgpl-license ON LGPL: -If you distribute software using the library, you must offer to supply the source code -of the library. `If you’re just using the official builds, you don’t have to do anything +If you distribute software using the library, you must offer to supply the source code +of the library. `If you’re just using the official builds, you don’t have to do anything special as the code is already available on GitHub.` @@ -50,24 +138,12 @@ Max plugin size : 200MB: https://intellij-support.jetbrains.com/hc/en-us/community/posts/206445729--Question-Limitation-of-Upload-Plugin-Size - - - - how to correctly scale/rotate/translate with AFFINE transformation: https://math.stackexchange.com/a/820632 -To run project: - -./gradlew runIde - - -- If serialized options are messed up ---- delete build/idea-sandbox/config/options/power.mode3.xml - - +---------------------------------------------------------------- # CRASH notes: @@ -97,56 +173,5 @@ WARNING: Use --illegal-access=warn to enable warnings of further illeg this is being tracked here: https://youtrack.jetbrains.com/issue/IDEA-210683 -##runIdeForUiTest gotcha -make sure no file is open inside the ./build folder, :clean and :runIdeForUiTest will break - - -#Gradle dev env -in intellij run configurations make an empty gradle config with these args to intended project file -runIde --args="C:\\path\\to\\my\\project\\file\\App22336.kt" -When upgrading gradle... (to make ./gradlew use a diff version on commadnline...) -go into gradle/wrapper/gradle-wrapper.properties, and change the URL from which it downloads the version - - -## when setting up on a new computer... -step 1. in File -> project structure -> SDKs ... '+' icon ---> add the IntelliJP Platform Plugin SDK -step 2. set that SDK as the project SDK to have the external library defined to access all intellij.openapi stuff - - -## testing normal - -`./gradlew :test --info` -- run a single test -`./gradlew :test --tests "com.cschar.pmode3.uitest.WriteTextJavaTest.writeSomeText"` - -# testing ui - -- in 1 terminal run -`./gradlew :clean :runIdeForUiTests` -`./gradlew :clean :runIdeForUiTests --args="C:\\Users\\codywin\\IdeaProjects\\untitled13\\src\\App22336.kt"` - - then open `http://localhost:8082/` to check UI structure - -- in another terminal -all tests: `TEST_TYPE=UI ./gradlew :test` -single test class: -- `TEST_TYPE=UI ./gradlew :test --tests "com.cschar.pmode3.uitest.OpenSettingsJavaTest"` -single testcase -- `TEST_TYPE=UI ./gradlew :test --info --tests "com.cschar.pmode3.uitest.OpenSettingsJavaTest.opens_project"` -- - -#### testing the demo repo for ui-robot test - -terminal 1: -./gradlew ui-test-example:clean ui-test-example:runIdeForUiTests & -`./gradlew ui-test-example:clean ui-test-example:runIdeForUiTests --args="C:\\Users\\codywin\\IdeaProjects\\untitled13\\src\\App22336.kt"` -terminal2 -./gradlew ui-test-example:test --tests "SayHelloJavaTest" - - -## for example reference of test code -https://github.com/JetBrains/gradle-intellij-plugin/tree/master/examples/simple-plugin/src/test/java/org/intellij/examples/simple/plugin -and maybe.. -https://github.com/JetBrains/intellij-sdk-code-samples/ \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 13f6afd..a08829f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,6 +6,18 @@ import org.gradle.api.tasks.testing.TestResult.ResultType fun properties(key: String) = providers.gradleProperty(key) fun environment(key: String) = providers.environmentVariable(key) + +// Configure project's dependencies +repositories { + mavenCentral() + maven { url = uri("https://jitpack.io") } + // for remoterobot + // https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring_multiple_repositories + maven { + url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") + } +} + plugins { //Gradle Test Output id("com.adarshr.test-logger") version "3.2.0" @@ -15,7 +27,9 @@ plugins { // Kotlin support id("org.jetbrains.kotlin.jvm") version "1.8.10" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.13.2" + +// id("org.jetbrains.intellij.platform") version "2.0.0-beta2"? + id("org.jetbrains.intellij") version "1.17.3" // Gradle Changelog Plugin id("org.jetbrains.changelog") version "2.0.0" // Gradle Qodana Plugin @@ -28,11 +42,11 @@ var remoteRobotVersion = "0.11.18" dependencies { implementation("com.google.code.gson:gson:2.10.1") - implementation(group = "org.json", name = "json", version = "20220320") + implementation(group = "org.json", name = "json", version = "20231013") implementation(group = "javazoom", name = "jlayer", version = "1.0.1") implementation(group = "org.imgscalr", name = "imgscalr-lib", version = "4.2") - implementation(group = "org.eclipse.jgit", name = "org.eclipse.jgit", version = "5.12.0.202106070339-r") { + implementation(group = "org.eclipse.jgit", name = "org.eclipse.jgit", version = "6.7.0.202309050840-r") { exclude(group = "org.slf4j", module = "slf4j-api") } @@ -55,22 +69,13 @@ dependencies { group = properties("pluginGroup").get() version = properties("pluginVersion").get() -// Configure project's dependencies -repositories { - mavenCentral() - - // for remoterobot - // https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring_multiple_repositories - maven { - url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") - } -} // Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+. kotlin { jvmToolchain(17) } + // Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html intellij { pluginName.set(properties("pluginName")) @@ -124,6 +129,7 @@ tasks { } jar { + duplicatesStrategy = DuplicatesStrategy.EXCLUDE // https://docs.gradle.org/current/userguide/more_about_tasks.html // https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archiveBaseName // https://stackoverflow.com/questions/56518451/ @@ -170,6 +176,8 @@ tasks { useJUnitPlatform() outputs.upToDateWhen { false } testLogging.showStandardStreams = true + + } // Configure UI tests plugin diff --git a/build.gradle.kts.BAK b/build.gradle.kts.BAK deleted file mode 100644 index 6568172..0000000 --- a/build.gradle.kts.BAK +++ /dev/null @@ -1,337 +0,0 @@ -// import io.gitlab.arturbosch.detekt.Detekt -import org.gradle.api.tasks.testing.TestResult.ResultType -import org.jetbrains.changelog.markdownToHTML -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - -fun properties(key: String) = project.findProperty(key).toString() - -buildscript { - repositories { - mavenCentral() - } -} - -plugins { - // Java support - https://docs.gradle.org/current/userguide/java_plugin.html#java_plugin - id("java") - // Kotlin support - // https://plugins.gradle.org/plugin/org.jetbrains.kotlin.jvm - id("org.jetbrains.kotlin.jvm") version "1.7.0" -// id("org.jetbrains.kotlin.jvm") version "1.4.10" - - // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij") version "1.13.2" - // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin - id("org.jetbrains.changelog") version "1.1.2" - // detekt linter - read more: https://detekt.github.io/detekt/gradle.html -// id("io.gitlab.arturbosch.detekt") version "1.17.1" - // ktlint linter - read more: https://github.com/JLLeitschuh/ktlint-gradle - // id("org.jlleitschuh.gradle.ktlint") version "10.0.0" - - id("com.github.johnrengelman.shadow") version "7.0.0" -} -group = project.findProperty("pluginGroup").toString() -// group = properties("pluginGroup") -version = properties("pluginVersion") - -// Configure project's dependencies -repositories { - mavenCentral() - // for remoterobot - // https://docs.gradle.org/current/userguide/declaring_repositories.html#sec:declaring_multiple_repositories - maven { - // https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/com/intellij/remoterobot/robot-server-plugin/ - url = uri("https://packages.jetbrains.team/maven/p/ij/intellij-dependencies") - } -} - -var remoteRobotVersion = "0.11.14" - -dependencies { -// detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:1.17.1") - - implementation(group = "org.json", name = "json", version = "20220320") - implementation(group = "javazoom", name = "jlayer", version = "1.0.1") - implementation(group = "org.imgscalr", name = "imgscalr-lib", version = "4.2") - - implementation(group = "org.eclipse.jgit", name = "org.eclipse.jgit", version = "5.12.0.202106070339-r") { - exclude(group = "org.slf4j", module = "slf4j-api") - } - - // robot-ui testing stuff -// testImplementation 'com.intellij.remoterobot:remote-robot:' + remoteRobotVersion -// testImplementation 'com.intellij.remoterobot:remote-fixtures:' + remoteRobotVersion - // for some reason this version is on maven - // https://mvnrepository.com/artifact/com.intellij.remoterobot/remote-fixtures/1.1.18 - // https://packages.jetbrains.team/maven/p/ij/intellij-dependencies/com/intellij/remoterobot/ - - // https://github.com/JetBrains/intellij-ui-test-robot - testImplementation("com.intellij.remoterobot:remote-robot:" + remoteRobotVersion) - testImplementation("com.intellij.remoterobot:remote-fixtures:" + remoteRobotVersion) - testImplementation("org.junit.jupiter:junit-jupiter:5.7.0") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.2") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.2") - - // Logging Network Calls - testImplementation("com.squareup.okhttp3:logging-interceptor:4.9.1") - - // Video Recording - testImplementation("com.automation-remarks:video-recorder-junit5:2.0") - - // https://www.baeldung.com/junit-5-gradle#enabling-support-for-old-versions - testCompileOnly("junit:junit:4.13.1") - testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.3.1") -} - -// Configure gradle-intellij-plugin plugin. -// Read more: https://github.com/JetBrains/gradle-intellij-plugin -intellij { - - pluginName.set(properties("pluginName")) - version.set(properties("platformVersion")) - type.set(properties("platformType")) - downloadSources.set(properties("platformDownloadSources").toBoolean()) - updateSinceUntilBuild.set(true) - - // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. - plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) -} - -// Configure gradle-changelog-plugin plugin. -// Read more: https://github.com/JetBrains/gradle-changelog-plugin -changelog { - version = properties("pluginVersion") - groups = emptyList() -} - - -val commandLineProjectProp: String by project - -tasks.register("hello") { - doLast { - println(commandLineProjectProp) - } -} - -// For Some reason :jar task adds frame classes to jar? here we manually exclude it -sourceSets.forEach { - val dirPaths = it.java.srcDirs.map { d -> d.path } - println("${it.name} : ${dirPaths.joinToString()}") -} -sourceSets { -// test { -// java { -// exclude("**/uitest**") -// } -// } -} - -subprojects { - apply { - plugin(JavaPlugin::class.java) - plugin("org.jetbrains.kotlin.jvm") - } - -// tasks { -// runIde { -// onlyIf { -// println("skipping runIde") -// false -// } -// } -// } -} - -// https://docs.gradle.org/current/userguide/tutorial_using_tasks.html -tasks { - - - - jar { - // https://docs.gradle.org/current/userguide/more_about_tasks.html - // https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:archiveBaseName - - // https://stackoverflow.com/questions/56518451/ - from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) }) - } - - // https://youtrack.jetbrains.com/issue/IDEA-210683/Illegal-reflective-access-in-IJ-codebase#focus=Comments-27-4620700.0-0 - getByName("buildSearchableOptions") { - jvmArgs( - "--illegal-access=deny", - "--add-opens=java.desktop/sun.awt=ALL-UNNAMED", - "--add-opens=java.desktop/java.awt=ALL-UNNAMED", - "--add-opens=java.base/java.lang=ALL-UNNAMED", - "--add-opens=java.desktop/javax.swing=ALL-UNNAMED", - "--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED", - "--add-opens=java.desktop/sun.font=ALL-UNNAMED", - "--add-opens=java.desktop/sun.swing=ALL-UNNAMED", - "--add-opens=java.desktop/com.apple.eawt.event=ALL-UNNAMED" - ) - } - - // tag example: https://www.baeldung.com/junit-5-gradle#configuring-junit-5-tests-with-gradle - // from CLI: // gradle clean test -DincludeTags='regression' -DexcludeTags='accessibility' - // custom gradle test config: https://stackoverflow.com/a/59022129/5198805 - // https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html - test { - - // we can specify to use Junit5... above - // but still have normal Junit4 tests working - // https://www.baeldung.com/junit-5-gradle#enabling-support-for-old-versions. - useJUnitPlatform() - - // even trying to mute them all, new warnings still popup... - // https://youtrack.jetbrains.com/issue/IDEA-258551 -// jvmArgs = listOf( -// "--add-opens=java.desktop/sun.awt=ALL-UNNAMED", -// "--add-opens=java.desktop/java.awt=ALL-UNNAMED", -// "--add-opens=java.base/java.lang=ALL-UNNAMED", -// "--add-opens=java.desktop/javax.swing=ALL-UNNAMED", -// "--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED", -// "--add-opens=java.desktop/sun.font=ALL-UNNAMED", -// "--add-opens=java.desktop/sun.swing=ALL-UNNAMED", -// "--add-opens=java.desktop/com.apple.eawt.event=ALL-UNNAMED", -// "--add-opens=java.base/java.io=ALL-UNNAMED" -// ) - - outputs.upToDateWhen { false } - testLogging.showStandardStreams = true - - // https://stackoverflow.com/a/69840376/5198805 - testLogging { - showCauses = false - showExceptions = false - showStackTraces = false -// showStandardStreams = false - - val ansiReset = "\u001B[0m" - val ansiGreen = "\u001B[32m" - val ansiRed = "\u001B[31m" - val ansiYellow = "\u001B[33m" - - fun getColoredResultType(resultType: ResultType): String { - return when (resultType) { - ResultType.SUCCESS -> "$ansiGreen $resultType $ansiReset" - ResultType.FAILURE -> "$ansiRed $resultType $ansiReset" - ResultType.SKIPPED -> "$ansiYellow $resultType $ansiReset" - } - } - - afterTest( - KotlinClosure2({ desc: TestDescriptor, result: TestResult -> - println("${desc.className} | ${desc.displayName} = ${getColoredResultType(result.resultType)}") - }) - ) - - afterSuite( - KotlinClosure2({ desc: TestDescriptor, result: TestResult -> - if (desc.parent == null) { - println("Result: ${result.resultType} (${result.testCount} tests, ${result.successfulTestCount} passed, ${result.failedTestCount} failed, ${result.skippedTestCount} skipped)") - } - }) - ) - } - } - - buildSearchableOptions { - enabled = false - jvmArgs = listOf( - "-Xmx6G", - "-Djdk.attach.allowAttachSelf=true", // for IDE perf plugin to be allowed to attach a trace agent - // "--add-exports", "java.base/jdk.internal.vm=ALL-UNNAMED" //j.internal.DebugAttachDetector - "--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED", // j.internal.DebugAttachDetector - - ) - } - - runIde { - - // ./gradlew runIde --args="C:\\path\\to\\project\\file.java" -// args=listOf() - - jvmArgs = listOf( - "-Xmx4G", - "-Djdk.attach.allowAttachSelf=true", // for IDE perf plugin to be allowed to attach a trace agent - // "--add-exports", "java.base/jdk.internal.vm=ALL-UNNAMED" //j.internal.DebugAttachDetector - "--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED", // j.internal.DebugAttachDetector - - ) - } - - runIdeForUiTests { - jvmArgs = listOf("-Xmx4G") - - // maxHeapSize = "4g" - -// In case your Idea is launched on remote machine you can enable public port and enable encryption of JS calls -// systemProperty "robot-server.host.public", "true" -// systemProperty "robot.encryption.enabled", "true" -// systemProperty "robot.encryption.password", "my super secret" - - systemProperty("robot-server.port", "8082") - systemProperty("ide.mac.message.dialogs.as.sheets", "false") - systemProperty("jb.privacy.policy.text", "") - systemProperty("idea.trust.all.projects", "true") - systemProperty("jb.consents.confirmation.enabled", "false") - } - - var javaVersion = "11" - - // Set the compatibility versions to 11 - withType { - sourceCompatibility = javaVersion - targetCompatibility = javaVersion - } - withType { - kotlinOptions.jvmTarget = javaVersion - } - -// withType { -// jvmTarget = javaVersion -// } - - patchPluginXml { - version.set(properties("pluginVersion")) - sinceBuild.set(properties("pluginSinceBuild")) - untilBuild.set(properties("pluginUntilBuild")) - - // Extract the section from README.md and provide for the plugin's manifest - pluginDescription.set( - File(projectDir, "README.md").readText().lines().run { - val start = "" - val end = "" - - if (!containsAll(listOf(start, end))) { - throw GradleException("Plugin description section not found in README.md:\n$start ... $end") - } - subList(indexOf(start) + 1, indexOf(end)) - }.joinToString("\n").run { markdownToHTML(this) } - ) - - // Get the latest available change notes from the changelog file - changeNotes.set(provider { changelog.getLatest().toHTML() }) - } - - runPluginVerifier { - ideVersions.set(properties("pluginVerifierIdeVersions").split(',').map(String::trim).filter(String::isNotEmpty)) - } - - downloadRobotServerPlugin { - version.set(remoteRobotVersion) - } - - publishPlugin { - dependsOn("patchChangelog") - token.set(System.getenv("PUBLISH_TOKEN")) - // pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 - // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: - // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())) - } - - // added to remove warning on build - inspectClassesForKotlinIC { - dependsOn(instrumentTestCode) - } -} diff --git a/gradle.properties b/gradle.properties index f9a6d0f..2e8c3e7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,20 +5,23 @@ pluginName = power-mode-zeranthium pluginRepositoryUrl = https://github.com/cschar/power-mode-zeranthium # SemVer format -> https://semver.org #pluginVersion = 3.2.0-eap.2 -pluginVersion = 3.2.0 +pluginVersion = 3.3.0 -# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html -pluginSinceBuild = 231 -# Not specifying until-build means it will include all future builds (including unreleased IDE versions, which might impact compatibility later). -pluginUntilBuild = 231.* +# Supported build number ranges: +# https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html +pluginSinceBuild = 232 +# Not specifying until-build means it will include all future builds +# (including unreleased IDE versions, which might impact compatibility later). +pluginUntilBuild = 241.* # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC -platformVersion = LATEST-EAP-SNAPSHOT -#platformVersion = 231-EAP-SNAPSHOT -#platformVersion = 2022.3 +#platformVersion = LATEST-EAP-SNAPSHOT +platformVersion = 2024.1 -pluginVerifierIdeVersions = 2023.1 + + +pluginVerifierIdeVersions = 2024.1 #pluginVerifierIdeVersions = 2022.3, 2022.2 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83..c30b486 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/com/cschar/pmode3/services/GitPackLoaderProgressMonitor.java b/src/main/java/com/cschar/pmode3/services/GitPackLoaderProgressMonitor.java index 4e3553c..5ac7f3d 100644 --- a/src/main/java/com/cschar/pmode3/services/GitPackLoaderProgressMonitor.java +++ b/src/main/java/com/cschar/pmode3/services/GitPackLoaderProgressMonitor.java @@ -92,4 +92,9 @@ public boolean isCancelled() { } return false; } + + @Override + public void showDuration(boolean enabled) { + return; + } } diff --git a/src/test/java/com/cschar/pmode3/PowerMode3Test.java b/src/test/java/com/cschar/pmode3/PowerMode3Test.java index 72c3fff..f073155 100644 --- a/src/test/java/com/cschar/pmode3/PowerMode3Test.java +++ b/src/test/java/com/cschar/pmode3/PowerMode3Test.java @@ -46,10 +46,24 @@ ////public class PowerMode3Test extends LightPlatform4TestCase { //This boots up the Service/Components defined in plugin.xml //public class PowerMode3Test extends BasePlatformTestCase { //This boots up the Service/Components defined in plugin.xml // +// @Test +// public void testCopy(){ +//// PowerMode3 pmode3Service = ApplicationManager.getApplication().getService(PowerMode3.class); +//// PowerMode3 p1 = new PowerMode3(); +//// +//// assertEquals(12, pmode3Service.pathDataMap.size()); +//// assertEquals(0, p1.pathDataMap.size()); +//// XmlSerializerUtil.copyBean(pmode3Service, p1); +//// +//// assertEquals(pmode3Service.getParticleRGB(), p1.getParticleRGB()); +//// assertEquals(12, p1.pathDataMap.size()); +// assertEquals(12, 12); +// +// } ////public class PowerMode3Test { //// private static final Logger LOG = Logger.getInstance(PowerMode3Test.class); //// private static final Logger LOG = LoggerFactory.getLogger(PowerMode3Test.class); -// private static final Logger LOG = Logger.getInstance(PowerMode3Test.class); +//// private static final Logger LOG = Logger.getInstance(PowerMode3Test.class); // //can use Tags to separate UiTests from unit tests // //// @@ -149,18 +163,5 @@ //// assertEquals(0.4f, spa.scale); //// } // -// @Test -// public void testCopy(){ -//// PowerMode3 pmode3Service = ApplicationManager.getApplication().getService(PowerMode3.class); -//// PowerMode3 p1 = new PowerMode3(); -//// -//// assertEquals(12, pmode3Service.pathDataMap.size()); -//// assertEquals(0, p1.pathDataMap.size()); -//// XmlSerializerUtil.copyBean(pmode3Service, p1); -//// -//// assertEquals(pmode3Service.getParticleRGB(), p1.getParticleRGB()); -//// assertEquals(12, p1.pathDataMap.size()); -// assertEquals(12, 12); // -// } //}