Looks decent, although I don't see any pics of gradle in the media =[.
plugins {
id 'java'
id 'war' // Gives access to providedCompile()
}
java {
sourceCompatibility = JavaVersion.VERSION_12
targetCompatibility = JavaVersion.VERSION_12
}
sourceSets {
main {
java {
srcDir 'src/main/java'
}
}
test {
java {
srcDir 'src/test/java'
}
}
}
repositories {
mavenCentral()
}
test {
useJUnitPlatform()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
compile fileTree(dir: 'lib', include: ['*.jar'])
providedCompile group: 'org.projectlombok', name: 'lombok', version: '1.16.22'
compile group: 'org.javacord', name: 'javacord', version: '3.0.4'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.10.1'
compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.10.1'
compile group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
}
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
sourceSets {
main {
java {
srcDir 'src/java/'
}
resources {
srcDir 'src/resources/'
}
}
}
buildscript {
repositories {
flatDir dirs: 'proguard/lib'
}
dependencies {
classpath ':proguard'
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io/' }
}
dependencies {
compile fileTree(dir: 'lib', include: ['*.jar'])
compile 'com.github.MinnDevelopment:java-discord-rpc:v1.3.1'
compile 'com.github.MinnDevelopment:discord-rpc-release:v3.3.0'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'Kandarin Client',
'Implementation-Version': 1,
'Main-Class': 'org.necrotic.client.Client'
}
baseName = 'Kandarin-gamepack-unobfuscated'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}
task proguard(type: proguard.gradle.ProGuardTask) {
configuration 'proguard.txt'
injars '/build/libs/Kandarin-gamepack-unobfuscated.jar'
outjars '/build/libs/Kandarin-gamepack.jar'
libraryjars 'proguard/rt.jar'
printmapping 'obfuscation.map'
}
task buildjar {
dependsOn 'fatJar'
dependsOn 'proguard'
tasks.findByName('proguard').mustRunAfter 'fatJar'
}
server
Code:plugins { id 'java' id 'war' // Gives access to providedCompile() } java { sourceCompatibility = JavaVersion.VERSION_12 targetCompatibility = JavaVersion.VERSION_12 } sourceSets { main { java { srcDir 'src/main/java' } } test { java { srcDir 'src/test/java' } } } repositories { mavenCentral() } test { useJUnitPlatform() } dependencies { testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1' compile fileTree(dir: 'lib', include: ['*.jar']) providedCompile group: 'org.projectlombok', name: 'lombok', version: '1.16.22' compile group: 'org.javacord', name: 'javacord', version: '3.0.4' compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version: '2.10.1' compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-jsr310', version: '2.10.1' compile group: 'org.jsoup', name: 'jsoup', version: '1.11.3' }
client
Code:apply plugin: 'java' java { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } sourceSets { main { java { srcDir 'src/java/' } resources { srcDir 'src/resources/' } } } buildscript { repositories { flatDir dirs: 'proguard/lib' } dependencies { classpath ':proguard' } } repositories { mavenCentral() jcenter() maven { url 'https://jitpack.io/' } } dependencies { compile fileTree(dir: 'lib', include: ['*.jar']) compile 'com.github.MinnDevelopment:java-discord-rpc:v1.3.1' compile 'com.github.MinnDevelopment:discord-rpc-release:v3.3.0' } task fatJar(type: Jar) { manifest { attributes 'Implementation-Title': 'Kandarin Client', 'Implementation-Version': 1, 'Main-Class': 'org.necrotic.client.Client' } baseName = 'Kandarin-gamepack-unobfuscated' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } with jar } task proguard(type: proguard.gradle.ProGuardTask) { configuration 'proguard.txt' injars '/build/libs/Kandarin-gamepack-unobfuscated.jar' outjars '/build/libs/Kandarin-gamepack.jar' libraryjars 'proguard/rt.jar' printmapping 'obfuscation.map' } task buildjar { dependsOn 'fatJar' dependsOn 'proguard' tasks.findByName('proguard').mustRunAfter 'fatJar' }
I suck at gradle so I hope you didn't expect anything good
anyone know how to even get started on this? can't seem to get it turned on by using intellij
Hey Mickey, the cache is not downloading by the client, so naturally I went to the dropbox link and it has been deleted... any change you could re-upload the cache?
Got some issues running this.
Tried in both IntelliJ and Eclipse. Strange thing is I got the original Necrotic setup just normally through IntelliJ.
Somebody knows what the problem is?
symbol: variable log
location: class JavaCord
Hello everyone! I've just tried running this myself but I got the following error while trying to run the server using InteliJ:
...necrotic_server-item_attributes\src\main\java\com\ruse\DiscordBot\JavaCord.java:178:error: cannot find symbol
log.info(String.format("No channel %s", ch));
^
symbol: variable log
location: class JavaCord
Anyone by any chance can help me troubleshoot this?
Thanks a lot in advance!
how do i run it?
i can get the client to run but the server won't run.
same here not working