A Sponge plugin providing the Kotlin runtime, standard library, and reflection library to other plugins.
Licensed under the MIT License.
First, ensure you have the Kotlin Gradle plugin enabled.
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.3'
}
}
apply plugin: 'kotlin'
or
plugins {
id "org.jetbrains.kotlin.jvm" version "1.1.3"
}
Next, add the JitPack repository:
repositories {
maven {
url 'https://jitpack.io/'
}
}
Last, add a dependency on Spotlin:
dependencies {
compile 'com.github.pxlpowered:Spotlin:0.1.0'
}
First, ensure you have the Kotlin Maven plugin enabled:
<build>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<goals> <goal>compile</goal> </goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Second, add the JitPack repository:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Last, add a dependency on Spotlin:
<dependencies>
<dependency>
<groupId>com.github.pxlpowered</groupId>
<artifactId>Spotlin</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
In order to make sure your plugin both requires and loads after Spotlin, add this to your @Plugin
annotation:
@[Plugin(dependencies = arrayOf(Dependency(id = "spotlin",
optional = false,
version = "0.1.0")))]
If you do not have the kapt
plugin enabled, you will also need to add this to your mcmod.info
file:
{
"requiredMods": [
"spotlin@0.1.0"
]
}