feat: moved to groovy dsl, registered cargo gradle tasks

This commit is contained in:
zaaarf 2023-08-28 12:15:05 +02:00
parent e7604e237b
commit fb8faffe2e
No known key found for this signature in database
GPG key ID: 6445A5CD15E5B40C
4 changed files with 57 additions and 48 deletions

57
build.gradle Normal file
View file

@ -0,0 +1,57 @@
plugins {
id 'java'
id 'org.jetbrains.intellij' version '1.14.1'
}
group = "com.codemp"
version = "1.0-SNAPSHOT"
java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
// 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 */))
}
tasks {
patchPluginXml {
sinceBuild.set("222")
untilBuild.set("232.*")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}
//define rust tasks
tasks.register('cargoBuild', Exec) {
workingDir '.'
commandLine 'cargo', 'build'
}
compileJava.dependsOn cargoBuild
tasks.register('cargoClean', Exec) {
workingDir '.'
commandLine 'cargo', 'clean'
}
clean.dependsOn cargoClean

View file

@ -1,47 +0,0 @@
plugins {
id("java")
id("org.jetbrains.kotlin.jvm") version "1.8.22"
id("org.jetbrains.intellij") version "1.14.1"
}
group = "com.codemp"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
}
// 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 */))
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "17"
targetCompatibility = "17"
}
withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
patchPluginXml {
sinceBuild.set("222")
untilBuild.set("232.*")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
}

View file

@ -1,5 +1,4 @@
package com.codemp.intellij; package com.codemp.intellij;
public class CodeMP { public class CodeMP {
public static native void connect(String addr);
} }