Advanced-Portals/build.gradle

77 lines
2.2 KiB
Groovy

plugins {
id 'fabric-loom' version '0.2.0-SNAPSHOT'
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
archivesBaseName = "advancedportals"
group = 'com.sekwah.advancedportals'
version = '1.0.0'
description = ""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
// configuration that holds jars to copy into lib
includeLibs
}
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
}
minecraft {
}
// includeLibs just says to include the library in the final jar
dependencies {
includeLibs group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
compile group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
includeLibs group: 'com.google.inject', name: 'guice', version:'4.0'
compile group: 'com.google.inject', name: 'guice', version:'4.0'
compile "org.bukkit:bukkit:1.13-R0.1-SNAPSHOT"
minecraft "com.mojang:minecraft:19w03c"
mappings "net.fabricmc:yarn:19w03c.6"
modCompile "net.fabricmc:fabric-loader:0.3.3.101"
// Fabric API. This is technically optional, but you probably want it anyway.
modCompile "net.fabricmc:fabric:0.1.4.78"
}
jar {
from configurations.includeLibs.collect { it.isDirectory() ? it : zipTree(it) }
}
// Set SPIGOT_LOC to the location of your server and SPIGOT_JAR as the name of the jar file in the server you want to run
// DIReallyKnowWhatIAmDoingISwear is to remove the stupid pause spigot has at the start
task runJar() {
doLast {
javaexec {
main "-jar"
args "${System.env.MC_SERVER_LOC}\\${System.env.MC_SERVER_JAR}.jar"
jvmArgs = ["-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005", "-DIReallyKnowWhatIAmDoingISwear=true"]
workingDir "${System.env.MC_SERVER_LOC}"
}
}
}
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}