From 7ea0ec76d7429f74dd748abb16ccf093aee20e7b Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sat, 18 Nov 2023 18:47:58 +0100 Subject: [PATCH] chore: readme, versioning, plugin.xml cleanup --- README.MD | 11 +++++++++++ build.gradle | 13 ++++++------- src/main/resources/META-INF/plugin.xml | 21 +++------------------ 3 files changed, 20 insertions(+), 25 deletions(-) create mode 100644 README.MD diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..6f516b9 --- /dev/null +++ b/README.MD @@ -0,0 +1,11 @@ +# CodeMP for IntelliJ +This repository contains the code for the CodeMP plugin for IntelliJ-family IDEs, as well as the glue for the JNI boilerplate generators for now. + +## Compiling, Testing, Installing +You can run a test using the Gradle `runIde` task. It will open in a new window an IntelliJ IDE with the plugin installed. + +With the `build` task you can generate a JAR that IntelliJ can *probably* load (this has not been tested yet). +You can do so by accessing the Settings menu (Ctrl + Alt + S or File > Settings > Plugins), then clicking on the gear icon and then on "Install Plugin from Disk...". + +The Rust library, presently, is bundled at build-time into the JAR and will not update automatically. +This may change in future versions. diff --git a/build.gradle b/build.gradle index 2f87473..4a66828 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ plugins { } group = "com.codemp" -version = "1.0-SNAPSHOT" +version = "0.1.0" java { sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17 @@ -21,13 +21,9 @@ dependencies { implementation 'ch.qos.logback:logback-classic:1.4.6' } -// Configure Gradle IntelliJ Plugin -// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html intellij { version.set("2022.2.5") - type.set("IC") // Target IDE Platform - - //plugins.set(listOf(/* Plugin Dependencies */)) + type.set("IC") } tasks { @@ -47,7 +43,7 @@ tasks { } } -//define rust tasks +//run cargo build tasks.register('cargoBuild', Exec) { workingDir '.' commandLine 'cargo', 'build' @@ -55,6 +51,7 @@ tasks.register('cargoBuild', Exec) { compileJava.dependsOn cargoBuild +//copy the generated binary into the resources folder tasks.register('copyBinary', Copy) { from "target/debug" into "src/main/resources" @@ -64,10 +61,12 @@ tasks.register('copyBinary', Copy) { patchPluginXml.dependsOn copyBinary +//delete old jni generated files tasks.register('deleteGeneratedNativeInterface', Delete) { delete 'src/main/java/com/codemp/intellij/jni' } +//delete cargo build files tasks.register('cargoClean', Exec) { workingDir '.' commandLine 'cargo', 'clean' diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 62ff542..be16e4e 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -1,25 +1,10 @@ - - com.codemp.intellij + CodeMP + CodeMP - - CodeMP + A plugin for MultiPlayer code editing across different IDEs. - - YourCompany - - - - most HTML tags may be used - ]]> - - com.intellij.modules.platform