-
Notifications
You must be signed in to change notification settings - Fork 0
Project Setup: Gradle
Restioson edited this page Jul 5, 2017
·
9 revisions
To include this repository, you need use jitpack.
Here is an example build.gradle:
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'com.github.johnrengelman.shadow'
group 'GROUP'
version 'VERSION'
sourceCompatibility = 1.8
sourceSets.main.java.srcDirs = [ 'src/kotlin/' ]
buildscript {
ext.kotlin_version = '1.1.3-2'
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.0'
}
}
repositories {
mavenCentral()
maven { url 'http://jitpack.io' }
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile 'com.github.restioson:kettle-engine:development-SNAPSHOT'
}
To build, you can use the build Gradle command.
Make sure that when running the jar, run the xxxx-all.jar, not just xxxx.jar. This is the shadowed version.
If you need to use a custom launcher (the default is DesktopLauncher), you must apply the application plugin, and set mainClassName to your custom launcher.