2019年11月11日 | Leave a comment buildscript { dependencies { classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: "8.8.2" } } plugins { id 'java' id 'application' id 'org.jetbrains.kotlin.jvm' version '1.3.50' } //repositories { // mavenLocal() // mavenCentral() //} apply plugin: 'javafx-gradle-plugin' group 'thelook' version '1.0-SNAPSHOT' sourceCompatibility = 1.8 mainClassName = "demo.App" repositories { mavenCentral() } dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // https://mvnrepository.com/artifact/org.apache.httpcomponents/fluent-hc compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.10' // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9' // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.0' testCompile group: 'junit', name: 'junit', version: '4.12' } compileKotlin { kotlinOptions.jvmTarget = "1.8" } compileTestKotlin { kotlinOptions.jvmTarget = "1.8" } jfx { // minimal requirement for jfxJar-task mainClass = 'demo.App' // minimal requirement for jfxNative-task vendor = 'demo' } 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 buildscript { dependencies { classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: "8.8.2" }} plugins { id 'java' id 'application' id 'org.jetbrains.kotlin.jvm' version '1.3.50'} //repositories {// mavenLocal()// mavenCentral()//} apply plugin: 'javafx-gradle-plugin' group 'thelook'version '1.0-SNAPSHOT' sourceCompatibility = 1.8mainClassName = "demo.App" repositories { mavenCentral()} dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8" // https://mvnrepository.com/artifact/org.apache.httpcomponents/fluent-hc compile group: 'org.apache.httpcomponents', name: 'fluent-hc', version: '4.5.10'// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.0' testCompile group: 'junit', name: 'junit', version: '4.12'} compileKotlin { kotlinOptions.jvmTarget = "1.8"}compileTestKotlin { kotlinOptions.jvmTarget = "1.8"} jfx { // minimal requirement for jfxJar-task mainClass = 'demo.App' // minimal requirement for jfxNative-task vendor = 'demo'} 参考: https://github.com/FibreFoX/javafx-gradle-plugin