Skip to content

Commit

Permalink
feature/2024.1 update (#22)
Browse files Browse the repository at this point in the history
* update

* update

* update versions
  • Loading branch information
cschar committed Jun 9, 2024
1 parent 0768741 commit 64a92b7
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 453 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
179 changes: 102 additions & 77 deletions README_dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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:
Expand All @@ -31,43 +121,29 @@ 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.`


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:
Expand Down Expand Up @@ -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/
34 changes: 21 additions & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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")
}

Expand All @@ -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"))
Expand Down Expand Up @@ -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/
Expand Down Expand Up @@ -170,6 +176,8 @@ tasks {
useJUnitPlatform()
outputs.upToDateWhen { false }
testLogging.showStandardStreams = true


}

// Configure UI tests plugin
Expand Down
Loading

0 comments on commit 64a92b7

Please sign in to comment.