Changed build system

This commit is contained in:
Sekwah 2018-07-23 01:43:29 +01:00
parent 5de6385051
commit e3ff485b09
34 changed files with 800 additions and 793 deletions

12
.gitignore vendored
View File

@ -1,18 +1,16 @@
*.class *.class
.* .*
/target/
/build/ /build/
/classes/ /target/
/run/
/logs/
# Package Files # # Package Files #
*.jar
*.war *.war
*.ear *.ear
*.iml *.iml
*.iws
*.ipr *.ipr
*.iws logs/
classes/
run/

View File

@ -1 +1,4 @@
language: java language: java
cache:
directories:
- $HOME/.m2

45
build.gradle Normal file
View File

@ -0,0 +1,45 @@
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'com.sekwah.advancedportals'
version = '0.0.42-snapshot'
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/" }
}
// includeLibs just says to include the library in the final jar
dependencies {
compile "org.bukkit:bukkit:1.12.1-R0.1-SNAPSHOT"
}
// 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}"
}
}
}

3
gradle.properties Normal file
View File

@ -0,0 +1,3 @@
# https://docs.gradle.org/current/userguide/build_environment.html
# Disable with --no-build-cache
org.gradle.caching=true

42
pom.xml
View File

@ -1,42 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sekwah.advancedportals</groupId>
<artifactId>Advanced-Portals</artifactId>
<build>
<sourceDirectory>${basedir}/src/</sourceDirectory>
<resources>
<resource>
<directory>${basedir}/Resources</directory>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<version>0.0.41-snapshot</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<!-- spigot's buildtools automatically places it in maven's repository after building it -->
<!-- Craftbukkit contains the bukkit code. But as the majority uses it uses bukkit
it stops the need to build to edit at least -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.12.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--<dependency>
<groupId>org.bukkit</groupId>
<artifactId>craftbukkit</artifactId>
<version>1.10.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>-->
</dependencies>
</project>