Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/lwjgl3
Path: blob/wip/rebase_3.3.3/update-dependencies.xml
2570 views
1
<!--
2
~ Copyright LWJGL. All rights reserved.
3
~ License terms: https://www.lwjgl.org/license
4
-->
5
6
<!-- Downloads LWJGL's library dependencies. -->
7
<project name="LWJGL" basedir="." default="update-dependencies" xmlns:if="ant:if" xmlns:unless="ant:unless">
8
9
<property name="config" location="config" relative="true"/>
10
<import file="${config}/build-definitions.xml" id="defs"/>
11
12
<!-- *********************************** -->
13
<property name="jsr305" value="3.0.2"/>
14
<property name="testng" value="7.5"/>
15
<property name="jcommander" value="1.78"/>
16
<property name="jquery" value="3.5.1"/>
17
<property name="slf4j" value="1.7.36"/>
18
<property name="joml" value="1.10.5"/>
19
<property name="kotlinc-version" value="1.9.0"/>
20
<property name="kotlinc-build" value="1.9.0-release-358"/>
21
<property name="jmh-core" value="1.37"/>
22
<property name="jmh-generator-annprocess" value="1.37"/>
23
<property name="jopt-simple" value="5.0.4"/>
24
<property name="commons-math3" value="3.6.1"/>
25
<!-- *********************************** -->
26
27
<target name="check-dependencies" description="Updates LWJGL dependencies, if required" unless="${build.offline}">
28
<!-- Checks if the Kotlin compiler must be updated -->
29
<local name="kotlinc-build-current"/>
30
<loadfile property="kotlinc-build-current" srcfile="${kotlinc}/build.txt" quiet="true" taskname="kotlinc"/>
31
<condition property="kotlinc-uptodate">
32
<and>
33
<isset property="kotlinc-build-current"/>
34
<equals arg1="${kotlinc-build-current}" arg2="${kotlinc-build}"/>
35
</and>
36
</condition>
37
38
<uptodate property="lib-uptodate" srcfile="update-dependencies.xml" targetfile="${lib}/touch.txt"/>
39
40
<local name="dependencies-uptodate"/>
41
<condition property="dependencies-uptodate">
42
<and>
43
<isset property="kotlinc-uptodate"/>
44
<isset property="lib-uptodate"/>
45
</and>
46
</condition>
47
48
<antcall target="update-dependencies" unless:set="dependencies-uptodate"/>
49
</target>
50
51
<target name="update-dependencies" description="Updates LWJGL dependencies" unless="${build.offline}">
52
<taskdef name="logLevel" classname="org.lwjgl.SetLogLevel" classpath="${bin.ant}"/>
53
54
<mkdir dir="${lib}"/>
55
<mkdir dir="${lib}/java"/>
56
<antcall target="-lib-download"/>
57
<antcall target="-kotlinc-download"/>
58
</target>
59
60
<!-- Downloads and extracts the Kotlin compiler. -->
61
<target name="-kotlinc-download" unless="kotlinc-uptodate">
62
<local name="kotlinc-archive"/>
63
<property name="kotlinc-archive" value="kotlin-compiler-${kotlinc-version}.zip"/>
64
65
<!-- Download new build -->
66
<get taskname="kotlinc" src="https://github.com/JetBrains/kotlin/releases/download/v${kotlinc-version}/${kotlinc-archive}" dest="${lib}" verbose="true"/>
67
68
<!-- Delete current build -->
69
<delete dir="${kotlinc}" taskname="kotlinc"/>
70
<!-- Extract build -->
71
<unzip src="${lib}/${kotlinc-archive}" dest="${lib}" taskname="kotlinc"/>
72
<!-- Delete build archive -->
73
<delete file="${lib}/${kotlinc-archive}" taskname="kotlinc"/>
74
75
<echo message="The Kotlin compiler was updated to build: ${kotlinc-version}" taskname="kotlinc"/>
76
</target>
77
78
<!-- Downloads the Java dependencies. -->
79
<target name="-lib-download" unless="lib-uptodate">
80
<update-mvn name="jsr305" group="com/google/code/findbugs" artifact="jsr305" version="${jsr305}"/>
81
<update-mvn name="TestNG" group="org/testng" artifact="testng" version="${testng}"/>
82
<update-mvn name="JCommander" group="com/beust" artifact="jcommander" version="${jcommander}" sources="false"/>
83
<update-mvn name="WebJars - jquery" group="org/webjars" artifact="jquery" version="${jquery}" sources="false"/>
84
<update-mvn name="SLF4J API" group="org/slf4j" artifact="slf4j-api" version="${slf4j}" sources="false"/>
85
<update-mvn name="SLF4J JDK14" group="org/slf4j" artifact="slf4j-jdk14" version="${slf4j}" sources="false"/>
86
<update-mvn name="JOML" group="org/joml" artifact="joml" version="${joml}"/>
87
<update-mvn name="JMH Core" group="org/openjdk/jmh" artifact="jmh-core" version="${jmh-core}"/>
88
<update-mvn name="JMH Generators: Annotation Processing" group="org/openjdk/jmh" artifact="jmh-generator-annprocess" version="${jmh-generator-annprocess}" sources="false"/>
89
<update-mvn name="JOpt Simple" group="net/sf/jopt-simple" artifact="jopt-simple" version="${jopt-simple}" sources="false"/>
90
<update-mvn name="Apache Commons Math" group="org/apache/commons" artifact="commons-math3" version="${commons-math3}" sources="false"/>
91
92
<touch file="${lib}/touch.txt" verbose="false"/>
93
</target>
94
95
<target name="clean" description="Deletes LWJGL dependencies">
96
<delete taskname="kotlinc" dir="${lib}/kotlinc"/>
97
<delete taskname="Java dependencies" dir="${lib}/java"/>
98
</target>
99
100
</project>
101
102