Skip to content

Commit

Permalink
move stuff over into new template
Browse files Browse the repository at this point in the history
  • Loading branch information
cschar committed Jun 11, 2024
1 parent 80716f0 commit 99daf2e
Show file tree
Hide file tree
Showing 48 changed files with 1,648 additions and 778 deletions.
16 changes: 5 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
.gradle
#build.gradle
#gradlew
#gradlew.bat
#settings.gradle

.DS_Store

build
#gradle
.idea

.intellijPlatform
.qodana
build

myjavadocs

docs/_site
docs/.jekyll-cache
docs/.jekyll-cache
24 changes: 24 additions & 0 deletions .run/Run Plugin.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runIde" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2" />
</configuration>
</component>
25 changes: 25 additions & 0 deletions .run/Run Tests.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Tests" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="check" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<RunAsTest>true</RunAsTest>
<method v="2" />
</configuration>
</component>
26 changes: 26 additions & 0 deletions .run/Run Verifications.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Run Verifications" type="GradleRunConfiguration" factoryName="Gradle">
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
<ExternalSystemSettings>
<option name="executionName" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="externalSystemIdString" value="GRADLE" />
<option name="scriptParameters" value="" />
<option name="taskDescriptions">
<list />
</option>
<option name="taskNames">
<list>
<option value="runPluginVerifier" />
</list>
</option>
<option name="vmOptions" value="" />
</ExternalSystemSettings>
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
</configuration>
</component>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down
634 changes: 634 additions & 0 deletions README_BAK.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README_dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,17 @@ rm `./build/idea-sandbox/config/options/power.mode.3.Zeranthium.xml`
add in Help > diagnostic Tools > Debug Log Settings
#com.cschar.pmode3:all (including # at start)

# then the log entries will be visible in
`build/idea-sandbox/<IDE-VERSION>/log/idea.log`
ex: `build/idea-sandbox/IC-2024.2/log/idea.log`


### generating custom javadocs

```
./gradlew :javadoc --rerun --quiet
./gradlew :javadoc --rerun --quiet > ./docsv2/_includes/options.md
```

----------------------------------------------------------------

Expand Down
29 changes: 11 additions & 18 deletions README_dev_refactor.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ uses this plugin:
https://plugins.jetbrains.com/plugin/15104-ide-perf


Try USING THIS FOR TESTS:
https://stackoverflow.com/a/46533151/5198805
https://github.com/radarsh/gradle-test-logger-plugin


Resources on IntelliJ API:
https://developerlife.com/2021/03/13/ij-idea-plugin-advanced/
http://vladsch.com/blog/3
Expand All @@ -36,24 +31,22 @@ RE-enable memory monitor UI
[x] - robotUI test: test to load packs through UI, prebuilt packs + custom pack
[ ] - Type , pseudo-Disable plugin, Type, assert when plugin disabled, characters are still typed

## BUGS ?

-- When stopping with CTRL+SHIFT+Z.... particles/dinos still float away instead of immediatly disappearing
## BUGS
-- When loading pack and hitting 'reload', label stays as 'downloading', but is done
-- in Droste, moving caret with arrow keys doesnt resize cover

## upgrade
put docs on astro site
https://docs.astro.build/en/guides/deploy/github/


# potentially..
- dynamic plugin enable/disable
- pack loaders now use Modal UIs when fetching packs from github

/opt/jdk/11/bin/javadoc \
-docletpath -docletpath ./build/classes/java/main \
-doclet com.cschar.pmode3.MyDoclet \
src/main/java/com/cschar/pmode3/MyDoclet.java

-docletpath -docletpath ./build/classes/java/main \
-doclet com.cschar.pmode3.MyTagScannerDoclet \
src/main/java/com/cschar/pmode3/MyTagScannerDoclet.java
# https://docs.oracle.com/en/java/javase/11/docs/api/jdk.javadoc/jdk/javadoc/doclet/package-summary.html#migration
```bash
javadoc \
-docletpath ./build/classes/java/main \
-doclet com.cschar.pmode3.tools.MyJavadoclet \
src.main.java.com.cschar.pmode3.tools

```
149 changes: 145 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@

import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

//https://github.com/Kotlin/dokka/blob/master/examples/gradle/dokka-customFormat-example/build.gradle.kts
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.base.DokkaBase
import org.jetbrains.dokka.base.DokkaBaseConfiguration

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)


//libs references the file named
// libs.versions.toml inside the gradle folder....
plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin

//Gradle Test Output
id("com.adarshr.test-logger") version "4.0.0"

//Generate docs
id("org.jetbrains.dokka") version "1.9.20"
// ./gradlew :dokkaHtml
// kotlin("jvm") version "1.9.22"

}

group = properties("pluginGroup").get()
Expand All @@ -35,10 +48,38 @@ repositories {
}
}

var remoteRobotVersion = "0.11.18"

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
// implementation(libs.exampleLibrary)


implementation("com.google.code.gson:gson:2.10.1")
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 = "6.7.0.202309050840-r") {
exclude(group = "org.slf4j", module = "slf4j-api")
}


// Testing
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")


// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(properties("platformType"), properties("platformVersion"))
Expand All @@ -52,6 +93,10 @@ dependencies {
instrumentationTools()
pluginVerifier()
testFramework(TestFrameworkType.Platform.JUnit4)


// https://github.com/JetBrains/intellij-platform-gradle-plugin/issues/1638#issuecomment-2151527333
// jetbrainsRuntime()
}
}

Expand Down Expand Up @@ -130,7 +175,103 @@ kover {
}
}




abstract class CreateFileTask : DefaultTask() {
@TaskAction
fun action() {
val file = File("myfile.txt")
file.createNewFile()
file.writeText("HELLO FROM MY TASK")
}
}

tasks.register<CreateFileTask>("createFileTask")

//configurations {
// jaxDoclet
//}



//tasks.withType(Javadoc) {
//
//}

//tasks.withType<DokkaTask>().configureEach {
// // custom output directory
// outputDirectory.set(buildDir.resolve("dokka"))
//
// dokkaSourceSets {
//
// named("main") { // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
//
// includes.from("packages.md", "extra.md")
//// samples.from("samples/basic.kt", "samples/advanced.kt")
// }
//
//// register("differentName") { // Different name, so source roots must be passed explicitly
//// displayName.set("JVM")
//// platform.set(org.jetbrains.dokka.Platform.jvm)
//// sourceRoots.from(kotlin.sourceSets.getByName("jvmMain").kotlin.srcDirs)
//// sourceRoots.from(kotlin.sourceSets.getByName("commonMain").kotlin.srcDirs)
//// }
// }
//}


buildscript {
dependencies {
classpath("org.jetbrains.dokka:dokka-base:1.9.20")
}
}

tasks {

// https://docs.gradle.org/current/kotlin-dsl/gradle/org.gradle.api.tasks.javadoc/-javadoc/index.html
javadoc {
// setDestinationDir(file("./myjavadocs/docs2"))

// options.docletpath = "./build/classes/java/main" as List
// options.docletpath = [rootProject.file("./build/classes/java/main")]

options.docletpath(file("./build/classes/java/main"))
options.doclet = "com.cschar.pmode3.tools.JsonConfigMarkdownDoclet"
options {
this as StandardJavadocDocletOptions
// noTimestamp()

}
}

dokkaHtml {
// https://kotlinlang.org/docs/dokka-gradle.html#single-project-configuration
dokkaSourceSets.configureEach {
documentedVisibilities.set(
setOf(
DokkaConfiguration.Visibility.PUBLIC,
DokkaConfiguration.Visibility.PROTECTED,
)
)
perPackageOption {
matchingRegex.set(".*.*")
suppress.set(true)
}

perPackageOption {
matchingRegex.set(".*config.*")
suppress.set(false)
}
perPackageOption {
matchingRegex.set(".*config.common.*")
suppress.set(true)
}
}
outputDirectory.set(file("mydocs/dokkaHtml"))
}


wrapper {
gradleVersion = properties("gradleVersion").get()
}
Expand All @@ -147,4 +288,4 @@ tasks {
publishPlugin {
dependsOn(patchChangelog)
}
}
}
Loading

0 comments on commit 99daf2e

Please sign in to comment.