This is an implementation of the Blaze packet system in Kotlin
Maven:
<dependency>
<groupId>com.jacobtread.blaze</groupId>
<artifactId>blaze-core</artifactId>
<version>{VERSION}</version>
</dependency>
Groovy:
repositories {
mavenCentral()
}
dependencies {
implementation 'com.jacobtread.blaze:blaze-core:{VERSION}'
}
Kotlin DSL:
repositories {
mavenCentral()
}
dependencies {
implementation("com.jacobtread.blaze:blaze-core:{VERSION}")
}
Maven:
NOT SUPPORTED
Groovy:
plugins {
id 'com.google.devtools.ksp' version '1.7.10-1.0.6'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.jacobtread.blaze:blaze-core:{VERSION}'
implementation 'com.jacobtread.blaze:blaze-annotations:{VERSION}'
ksp 'com.jacobtread.blaze:blaze-processor:{VERSION}'
}
Kotlin DSL:
plugins {
id("com.google.devtools.ksp") version "1.7.10-1.0.6"
}
repositories {
mavenCentral()
}
dependencies {
implementation("com.jacobtread.blaze:blaze-core:{VERSION}")
implementation("com.jacobtread.blaze:blaze-annotations:{VERSION}")
ksp("com.jacobtread.blaze:blaze-processor:{VERSION}")
}
If you are using Intellij IDEA you may run into the following error
Execution optimizations have been disabled for task ':publishPluginJar' to ensure correctness due to the following reasons:
Gradle detected a problem with the following location: '../build/generated/ksp/main/kotlin'.
Reason: Task ':publishPluginJar' uses this output of task ':kspKotlin' without declaring an explicit or implicit dependency.
You can fix this by adding the following to your build script
Kotlin DSL:
plugins {
// ...
idea
}
idea {
module {
// Not using += due to https://github.com/gradle/gradle/issues/8749
sourceDirs = sourceDirs + file("build/generated/ksp/main/kotlin") // or tasks["kspKotlin"].destination
testSourceDirs = testSourceDirs + file("build/generated/ksp/test/kotlin")
generatedSourceDirs = generatedSourceDirs + file("build/generated/ksp/main/kotlin") + file("build/generated/ksp/test/kotlin")
}
}
Groovy:
plugins {
// ...
id 'idea'
}
idea {
module {
// Not using += due to https://github.com/gradle/gradle/issues/8749
sourceDirs = sourceDirs + file('build/generated/ksp/main/kotlin') // or tasks["kspKotlin"].destination
testSourceDirs = testSourceDirs + file('build/generated/ksp/test/kotlin')
generatedSourceDirs = generatedSourceDirs + file('build/generated/ksp/main/kotlin') + file('build/generated/ksp/test/kotlin')
}
}
TODO: More information and guides