forked from stleary/JSON-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
146 lines (134 loc) · 7.02 KB
/
build.xml
File metadata and controls
146 lines (134 loc) · 7.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="JSON" default="default" basedir=".">
<description>Builds, tests, and runs the project JSON.</description>
<import file="nbproject/build-impl.xml"/>
<!-- =================================================================== -->
<!-- post NB init -->
<!-- =================================================================== -->
<target name="-post-init">
<property name="jdk" value="C:\Program Files\Java\jdk1.8.0_202"/>
<property name="javadocEXE" value="${jdk}/bin/javadoc.exe"/>
<!-- general properties definition -->
<property name="archiveName" value="JSON"/>
<condition property="javadoc.exists">
<available file="${dist.javadoc.dir}" type="dir"/>
</condition>
<condition property="distrib.notexists">
<not>
<available file="distrib" type="dir"/>
</not>
</condition>
<property name="j2seapi" value="http://docs.oracle.com/javase/7/docs/api/"/>
<!-- To set with your location of Java 8 JDK -->
<property name="javadocDir" value="${jdk.home}/docs/api"/>
<property name="javadocEXE" value="${jdk.home}/bin/javadoc.exe"/>
</target>
<!-- =================================================================== -->
<!-- Non NB targets -->
<!-- =================================================================== -->
<target description="fetch version" depends="-init-project" name="version">
<loadproperties srcFile="${src.dir}/org/json/json.properties">
<filterchain>
<linecontains>
<contains value="version"/>
</linecontains>
</filterchain>
</loadproperties>
</target>
<!-- =================================================================== -->
<!-- zip files -->
<!-- =================================================================== -->
<!-- zip javadocs -->
<target depends="version, -post-init"
description="create javadoc zip files" name="zipjavadoc" if="javadoc.exists">
<zip compress="true" defaultexcludes="true" zipfile="${dist.dir}/${archiveName}-docs-${version}.zip">
<fileset description="documentation" dir="${dist.javadoc.dir}">
<include name="**/*"/>
</fileset>
</zip>
</target>
<target depends="version, -post-init, zipjavadoc" description="create zip files" name="zip">
<!-- zip binary files -->
<zip compress="true" defaultexcludes="true" zipfile="${dist.dir}/${archiveName}-bin-${version}.zip">
<fileset description="docs" dir=".">
<include name="README.md"/>
<include name="CHANGES.md"/>
<include name="LICENSE"/>
</fileset>
<fileset description="binaries" dir="${dist.dir}">
<include name="json.jar"/>
</fileset>
</zip>
<!-- zip source files for APACHE - LGPL distribution -->
<zip compress="true" defaultexcludes="yes" zipfile="${dist.dir}/${archiveName}-src-${version}.zip">
<fileset description="core source directory" dir="${src.dir}/..">
<include name="src/**/*.java"/>
<include name="src/**/*.html"/>
<include name="src/**/*.properties"/>
<include name="src/manifest.mf"/>
</fileset>
<fileset description="binaries" dir="${dist.dir}">
<include name="json.jar"/>
</fileset>
<fileset description="project" dir="${dist.dir}/..">
<include name="nbproject/**/*.*"/>
</fileset>
<fileset description="misc" dir=".">
<include name="README.md"/>
<include name="CHANGES.md"/>
<include name="LICENSE"/>
<include name="build.xml"/>
</fileset>
</zip>
<!-- zip test source files -->
<zip compress="true" defaultexcludes="true" zipfile="${dist.dir}/${archiveName}-tests-${version}.zip">
<fileset description="tests directory" dir="${test.src.dir}/..">
<include name="test/**/*.*"/>
</fileset>
</zip>
</target>
<!-- =================================================================== -->
<!-- NB overwrite targets : javadocs -->
<!-- =================================================================== -->
<target depends="-javadoc-core" name="-javadoc-build" />
<target depends="init, -init-project, -post-init" name="-javadoc-core">
<!-- Javadoc -->
<javadoc author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}"
docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true"
noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}"
notree="${javadoc.notree}" private="${javadoc.private}"
source="${javac.source}" splitindex="${javadoc.splitindex}"
overview="${src.dir}/overview.html"
use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}"
windowtitle="JSON Java API" executable="${javadocEXE}" >
<link href="${j2seapi}" />
<!-- the Xdoclint argument avoid to get javadoc errors when the documentation format is not compliant for HTML 4, which was the case before
Java 8. It would also not be a good idea, because empty tags like br are very useful -->
<arg line="-Xdoclint:none"/>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
</javadoc>
</target>
<!-- =================================================================== -->
<!-- NB overwrite targets : jar -->
<!-- =================================================================== -->
<target depends="init,compile,-pre-jar,-do-jar-without-manifest,-post-jar" description="Build JAR." name="jar"/>
<target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" >
<!-- jar construction -->
<jar description="jar binary file" compress="true" jarfile="${dist.dir}/json.jar" manifest="${src.dir}/manifest.mf" >
<fileset defaultexcludes="yes" dir="${build.classes.dir}">
<include name="org/json/**/*.class"/>
<include name="org/json/**/*.properties"/>
</fileset>
</jar>
</target>
</project>