Переход на Gradle
This commit is contained in:
13
.classpath
13
.classpath
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<classpath>
|
|
||||||
<classpathentry kind="src" path="src"/>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
|
||||||
<classpathentry kind="lib" path="lib/lwjgl.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="LWJake2/lib/lwjgl_native"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="lib/lwjgl_util.jar"/>
|
|
||||||
<classpathentry kind="lib" path="lib/flibitEFX.jar"/>
|
|
||||||
<classpathentry kind="output" path="bin"/>
|
|
||||||
</classpath>
|
|
||||||
17
.project
17
.project
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<projectDescription>
|
|
||||||
<name>LWJake2</name>
|
|
||||||
<comment></comment>
|
|
||||||
<projects>
|
|
||||||
</projects>
|
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments>
|
|
||||||
</arguments>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<natures>
|
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
|
||||||
</natures>
|
|
||||||
</projectDescription>
|
|
||||||
50
build.gradle
Normal file
50
build.gradle
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
apply plugin: 'java'
|
||||||
|
apply plugin: 'application'
|
||||||
|
apply plugin: 'idea'
|
||||||
|
apply plugin: 'eclipse'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
import org.gradle.internal.os.OperatingSystem;
|
||||||
|
|
||||||
|
def lwjgl_ver = '2.9.3'
|
||||||
|
def platform = ''
|
||||||
|
if (OperatingSystem.current().isWindows()) {
|
||||||
|
platform = 'windows'
|
||||||
|
} else if (OperatingSystem.current().isMacOsX()) {
|
||||||
|
platform = 'osx'
|
||||||
|
} else if (OperatingSystem.current().isLinux()) {
|
||||||
|
platform = 'linux'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile (['org.lwjgl.lwjgl:lwjgl:' + lwjgl_ver],
|
||||||
|
['org.lwjgl.lwjgl:lwjgl_util:' + lwjgl_ver])
|
||||||
|
compile fileTree (dir: 'lib', include: 'flibitEFX.jar')
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
|
main {
|
||||||
|
java.srcDirs = ['src']
|
||||||
|
resources.srcDirs = ['resources']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mainClassName = 'lwjake2.LWJake2'
|
||||||
|
applicationDefaultJvmArgs = ["-Djava.library.path=$buildDir/natives/$platform"]
|
||||||
|
|
||||||
|
task t1(type: Copy) {
|
||||||
|
configurations.compile.filter {
|
||||||
|
(it.getName().indexOf("lwjgl-platform-") >= 0) &&
|
||||||
|
(it.getName().indexOf("$platform") >= 0)
|
||||||
|
}.each {
|
||||||
|
includeEmptyDirs = false
|
||||||
|
from (zipTree(it)) {
|
||||||
|
exclude "META-INF/*"
|
||||||
|
}
|
||||||
|
into "$buildDir/natives/$platform"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
215
build.xml
215
build.xml
@@ -1,215 +0,0 @@
|
|||||||
<project default="all" name="Build LWJake2">
|
|
||||||
|
|
||||||
<!-- Delete the output directories -->
|
|
||||||
<target name="clean">
|
|
||||||
<delete dir="built"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Classpath list for javac compiling -->
|
|
||||||
<path id="libPath">
|
|
||||||
<pathelement location="lib/lwjgl.jar"/>
|
|
||||||
<pathelement location="lib/lwjgl_util.jar"/>
|
|
||||||
<pathelement location="lib/flibitEFX.jar"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<!-- FindBugs task definition -->
|
|
||||||
<taskdef name="findbugs" classname="edu.umd.cs.findbugs.anttask.FindBugsTask">
|
|
||||||
<classpath>
|
|
||||||
<pathelement location="findbugs/findbugs-2.0.0/lib/findbugs.jar"/>
|
|
||||||
</classpath>
|
|
||||||
</taskdef>
|
|
||||||
|
|
||||||
<!-- Compile LWJake2 -->
|
|
||||||
<target name="compile" depends="clean">
|
|
||||||
<!-- Compile the source code with javac -->
|
|
||||||
<mkdir dir="built/javac"/>
|
|
||||||
<javac destdir="built/javac" debug="on" source="1.5" target="1.5" includeantruntime="false">
|
|
||||||
<src path="src"/>
|
|
||||||
<classpath refid="libPath"/>
|
|
||||||
</javac>
|
|
||||||
|
|
||||||
<!-- Build the LWJake2 jar -->
|
|
||||||
<mkdir dir="built/jar"/>
|
|
||||||
<jar destfile="built/jar/lwjake2.jar">
|
|
||||||
<manifest>
|
|
||||||
<attribute name="Main-Class" value="lwjake2.LWJake2"/>
|
|
||||||
<attribute name="Class-Path" value=". lwjgl.jar lwjgl_util.jar flibitEFX.jar"/>
|
|
||||||
</manifest>
|
|
||||||
<fileset dir="built/javac/"/>
|
|
||||||
</jar>
|
|
||||||
|
|
||||||
<!-- Run FindBugs on the current source -->
|
|
||||||
<findbugs
|
|
||||||
home="findbugs/findbugs-2.0.0/lib/"
|
|
||||||
output="html"
|
|
||||||
outputFile="built/bugs.html"
|
|
||||||
projectFile="findbugs/LWJake2.fbp"
|
|
||||||
excludeFilter="findbugs/LWJake2.fbf"
|
|
||||||
/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build GNU/Linux version of LWJake2 -->
|
|
||||||
<target name="linux" depends="compile">
|
|
||||||
<!-- Copy LWJake2 jar -->
|
|
||||||
<copy file="built/jar/lwjake2.jar" todir="built/Linux"/>
|
|
||||||
|
|
||||||
<!-- Copy libs -->
|
|
||||||
<copy todir="built/Linux">
|
|
||||||
<fileset dir="lib">
|
|
||||||
<include name="lwjgl.jar"/>
|
|
||||||
<include name="lwjgl_util.jar"/>
|
|
||||||
<include name="flibitEFX.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- Copy licenses folder and README files -->
|
|
||||||
<copy todir="built/Linux/licenses">
|
|
||||||
<fileset dir="licenses"/>
|
|
||||||
</copy>
|
|
||||||
<copy file="README" todir="built/Linux"/>
|
|
||||||
<copy file="readme.id" todir="built/Linux"/>
|
|
||||||
|
|
||||||
<!-- Copy GNU/Linux executable file -->
|
|
||||||
<copy file="executables/LWJake2.sh" todir="built/Linux"/>
|
|
||||||
|
|
||||||
<!-- Copy GNU/Linux native libraries -->
|
|
||||||
<copy file="lib/lwjgl_native/liblwjgl.so" todir="built/Linux"/>
|
|
||||||
<copy file="lib/lwjgl_native/liblwjgl64.so" todir="built/Linux"/>
|
|
||||||
<copy file="lib/lwjgl_native/libopenal.so" todir="built/Linux"/>
|
|
||||||
<copy file="lib/lwjgl_native/libopenal64.so" todir="built/Linux"/>
|
|
||||||
|
|
||||||
<!-- Create the zip distribution -->
|
|
||||||
<mkdir dir="built/zip"/>
|
|
||||||
<zip destfile="built/zip/LWJake2-Linux.zip">
|
|
||||||
<zipfileset dir="built/Linux" prefix="LWJake2"/>
|
|
||||||
</zip>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build OSX version of LWJake2 -->
|
|
||||||
<target name="osx" depends="compile">
|
|
||||||
<!-- Copy LWJake2 jar -->
|
|
||||||
<copy file="built/jar/lwjake2.jar" todir="built/OSX"/>
|
|
||||||
|
|
||||||
<!-- Copy libs -->
|
|
||||||
<copy todir="built/OSX">
|
|
||||||
<fileset dir="lib">
|
|
||||||
<include name="lwjgl.jar"/>
|
|
||||||
<include name="lwjgl_util.jar"/>
|
|
||||||
<include name="flibitEFX.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- Copy licenses folder and README files -->
|
|
||||||
<copy todir="built/OSX/licenses">
|
|
||||||
<fileset dir="licenses"/>
|
|
||||||
</copy>
|
|
||||||
<copy file="README" todir="built/OSX"/>
|
|
||||||
<copy file="readme.id" todir="built/OSX"/>
|
|
||||||
|
|
||||||
<!-- Copy OSX executable file -->
|
|
||||||
<copy file="executables/LWJake2.sh" todir="built/OSX"/>
|
|
||||||
|
|
||||||
<!-- Copy OSX native libraries -->
|
|
||||||
<copy file="lib/lwjgl_native/liblwjgl.jnilib" todir="built/OSX"/>
|
|
||||||
<copy file="lib/lwjgl_native/openal.dylib" todir="built/OSX"/>
|
|
||||||
|
|
||||||
<!-- Create the zip distribution -->
|
|
||||||
<mkdir dir="built/zip"/>
|
|
||||||
<zip destfile="built/zip/LWJake2-OSX.zip">
|
|
||||||
<zipfileset dir="built/OSX" prefix="LWJake2"/>
|
|
||||||
</zip>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build Windows version of LWJake2 -->
|
|
||||||
<target name="windows" depends="compile">
|
|
||||||
<!-- Copy LWJake2 jar -->
|
|
||||||
<copy file="built/jar/lwjake2.jar" todir="built/Windows"/>
|
|
||||||
|
|
||||||
<!-- Copy libs -->
|
|
||||||
<copy todir="built/Windows">
|
|
||||||
<fileset dir="lib">
|
|
||||||
<include name="lwjgl.jar"/>
|
|
||||||
<include name="lwjgl_util.jar"/>
|
|
||||||
<include name="flibitEFX.jar"/>
|
|
||||||
</fileset>
|
|
||||||
</copy>
|
|
||||||
|
|
||||||
<!-- Copy licenses folder and README files -->
|
|
||||||
<copy todir="built/Windows/licenses">
|
|
||||||
<fileset dir="licenses"/>
|
|
||||||
</copy>
|
|
||||||
<copy file="README" todir="built/Windows"/>
|
|
||||||
<copy file="readme.id" todir="built/Windows"/>
|
|
||||||
|
|
||||||
<!-- Copy Windows executable file -->
|
|
||||||
<copy file="executables/LWJake2.bat" todir="built/Windows"/>
|
|
||||||
|
|
||||||
<!-- Copy Windows native libraries -->
|
|
||||||
<copy file="lib/lwjgl_native/lwjgl.dll" todir="built/Windows"/>
|
|
||||||
<copy file="lib/lwjgl_native/lwjgl64.dll" todir="built/Windows"/>
|
|
||||||
<copy file="lib/lwjgl_native/OpenAL32.dll" todir="built/Windows"/>
|
|
||||||
<copy file="lib/lwjgl_native/OpenAL64.dll" todir="built/Windows"/>
|
|
||||||
|
|
||||||
<!-- Create the zip distribution -->
|
|
||||||
<mkdir dir="built/zip"/>
|
|
||||||
<zip destfile="built/zip/LWJake2-Windows.zip">
|
|
||||||
<zipfileset dir="built/Windows" prefix="LWJake2"/>
|
|
||||||
</zip>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build the server version of LWJake2 -->
|
|
||||||
<target name="server" depends="compile">
|
|
||||||
<!--Copy LWJake2 jar -->
|
|
||||||
<copy file="built/jar/lwjake2.jar" todir="built/Server"/>
|
|
||||||
|
|
||||||
<!-- Copy licenses folder and README files -->
|
|
||||||
<copy todir="built/Server/licenses">
|
|
||||||
<fileset dir="licenses"/>
|
|
||||||
</copy>
|
|
||||||
<copy file="README" todir="built/Server"/>
|
|
||||||
<copy file="readme.id" todir="built/Server"/>
|
|
||||||
|
|
||||||
<!-- Copy executable files -->
|
|
||||||
<copy file="executables/LWJake2_Server.sh" todir="built/Server"/>
|
|
||||||
<copy file="executables/LWJake2_Server.bat" todir="built/Server"/>
|
|
||||||
|
|
||||||
<!-- Create the zip distribution -->
|
|
||||||
<mkdir dir="built/zip"/>
|
|
||||||
<zip destfile="built/zip/LWJake2-Server.zip">
|
|
||||||
<zipfileset dir="built/Server" prefix="LWJake2"/>
|
|
||||||
</zip>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<!-- Build the source distribution -->
|
|
||||||
<target name="srcdist" depends="clean">
|
|
||||||
<mkdir dir="built/srcdist"/>
|
|
||||||
<tar destfile="built/srcdist/LWJake2-src.tar.gz" compression="gzip">
|
|
||||||
<tarfileset dir="executables" prefix="LWJake2/executables"/>
|
|
||||||
<tarfileset dir="findbugs" prefix="LWJake2/findbugs"/>
|
|
||||||
<tarfileset dir="lib" prefix="LWJake2/lib"/>
|
|
||||||
<tarfileset dir="licenses" prefix="LWJake2/licenses"/>
|
|
||||||
<tarfileset dir="src" prefix="LWJake2/src"/>
|
|
||||||
<tarfileset dir="." prefix="LWJake2">
|
|
||||||
<include name="build.xml"/>
|
|
||||||
<include name="README"/>
|
|
||||||
<include name="readme.id"/>
|
|
||||||
</tarfileset>
|
|
||||||
</tar>
|
|
||||||
<zip destfile="built/srcdist/LWJake2-src.zip">
|
|
||||||
<zipfileset dir="." prefix="LWJake2">
|
|
||||||
<include name="executables/**"/>
|
|
||||||
<include name="findbugs/**"/>
|
|
||||||
<include name="lib/**"/>
|
|
||||||
<include name="licenses/**"/>
|
|
||||||
<include name="src/**"/>
|
|
||||||
<include name="build.xml"/>
|
|
||||||
<include name="README"/>
|
|
||||||
<include name="readme.id"/>
|
|
||||||
</zipfileset>
|
|
||||||
</zip>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
<target name="all" depends="linux,osx,windows,server,srcdist">
|
|
||||||
</target>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
Reference in New Issue
Block a user