apply plugin: 'java'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
ext {
jmonkeyengine_version = '[3.1,)'
}
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
compile "com.jme3:jme3-core:$jmonkeyengine_version.+"
}
sourceSets {
main {
java { srcDir 'src'}
resources { srcDir 'assets' }
}
}
// NetBeans will automatically add “run” and “debug” tasks relying on the
// “mainClass” property. You may however define the property prior executing
// tasks by passing a “-PmainClass=<QUALIFIED_CLASS_NAME>” argument.
//
// Note however, that you may define your own “run” and “debug” task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty(‘mainClass’)) {
ext.mainClass = ‘’
}
apply plugin: 'java'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
ext {
jmonkeyengine_version = '[3.1,)'
}
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
compile "org.jmonkeyengine:jme3-core:$jmonkeyengine_version"
compile 'org.slf4j:slf4j-api:1.7.13'
}
sourceSets {
main {
java { srcDir 'src'}
resources { srcDir 'assets' }
}
}
And the LoggerFactory cannot be found… what did I miss? Thanks!
LoggerFactory is part of the sl4f-api.jar. But you need to also provide a backend like thoses listed by @Empire_Phoenix. Often I define the backend in scope runtime or testRuntime.
(slf4-api is define in scope compile, few line above)
apply plugin: 'java'
sourceCompatibility = '1.8'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
// NetBeans will automatically add "run" and "debug" tasks relying on the
// "mainClass" property. You may however define the property prior executing
// tasks by passing a "-PmainClass=<QUALIFIED_CLASS_NAME>" argument.
//
// Note however, that you may define your own "run" and "debug" task if you
// prefer. In this case NetBeans will not add these tasks but you may rely on
// your own implementation.
if (!hasProperty('mainClass')) {
ext.mainClass = ''
}
ext {
jmonkeyengine_version = '[3.1,)'
}
repositories {
jcenter()
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
compile "org.jmonkeyengine:jme3-core:$jmonkeyengine_version"
compile 'org.slf4j:slf4j-api:1.7.13'
runtime 'ch.qos.logback:logback-classic:1.1.2'
}
sourceSets {
main {
java { srcDir 'src'}
resources { srcDir 'assets' }
}
}
But I still get
Error:(10, 17) java: package org.slf4j does not exist