From 6f83a70c478f9b507727191f5125ad51c05eb9cd Mon Sep 17 00:00:00 2001
From: Philipp <admin@philipp.info>
Date: Sat, 29 May 2021 22:37:28 +0200
Subject: [PATCH] Replace build.xml with mods/phpdoc-config.xml

---
 .gitignore             |  3 +-
 build.xml              | 76 ------------------------------------------
 mods/phpdoc-config.xml | 24 +++++++++++++
 3 files changed, 26 insertions(+), 77 deletions(-)
 delete mode 100644 build.xml
 create mode 100644 mods/phpdoc-config.xml

diff --git a/.gitignore b/.gitignore
index 9044604f81..f0d31912d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,7 +16,8 @@ robots.txt
 /config/addon.ini.php
 
 #ignore documentation, it should be newly built
-/doc/html
+/doc/api
+/doc/cache
 
 #ignore reports, should be generated with every build
 report/
diff --git a/build.xml b/build.xml
deleted file mode 100644
index a61a5123d7..0000000000
--- a/build.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="friendica" default="test">
-	<!-- ====================================================== -->
-	<!-- Target: clean-test -->
-	<!-- deletes directories with old test reports -->
-	<!-- ====================================================== -->
-	<target name="clean-test">
-		<delete dir="report" />
-	</target>
-	
-	<!-- ====================================================== -->
-	<!-- Target: prepare-test -->
-	<!-- creates directories for test reports -->
-	<!-- ====================================================== -->
-	<target name="prepare-test" depends="clean-test">
-		<mkdir dir="report" />
-	</target>
-	
-	<!-- =================================== -->
-	<!-- Target: test -->
-	<!-- this target runs all test files -->
-	<!-- =================================== -->
-	<target name="test" depends="prepare-test">
-		<!-- coverage-setup database="./report/coverage-database">
-			<fileset dir=".">
-				<include name="**/*.php" />
-				<exclude name="*test.php"/>
-				<exclude name="index.php"/>
-				<exclude name="library/**"/>
-				<exclude name="doc/**"/>
-				<exclude name=".."/>
-			</fileset>
-		</coverage-setup -->
-		<phpunit printsummary="true">
-			<batchtest>
-				<fileset dir="tests">
-					<include name="*test.php" />
-				</fileset>
-			</batchtest>
-			<formatter type="xml" todir="report" outfile="testlog.xml" />
-		</phpunit>
-		<phpunitreport infile="report/testlog.xml" todir="report" />
-		<!-- coverage-report outfile="report/coverage-database">
-		      <report todir="report" styledir="/home/phing/etc" />
-		    </coverage-report -->
-	</target>
-
-	<!-- ===================================================== -->
-	<!-- Target: clean-doc -->
-	<!-- this target removes documentation from a previous run -->
-	<!-- ===================================================== -->
-	<target name="doc-clean">
-		<echo msg="Removing old documentation..." />
-		<delete dir="./doc/api/" />
-		<echo msg="Generate documentation directory..." />
-		<mkdir dir="./doc/api/" />
-	</target>
-
-	<!-- ====================================== -->
-	<!-- Target: doc -->
-	<!-- this target builds all documentation -->
-	<!-- ====================================== -->
-	<target name="doc" depends="doc-clean">
-		<echo msg="Building documentation..." />
-		<docblox title="Friendica API" destdir="./doc/api">
-			<fileset dir=".">
-				<include name="**/*.php" />
-				<include name="README"/>
-				<include name="INSTALL.txt"/>
-				<include name="LICENSE"/>
-			</fileset>
-		</docblox>
-	</target>
-
-</project>
diff --git a/mods/phpdoc-config.xml b/mods/phpdoc-config.xml
new file mode 100644
index 0000000000..bcdfa7d3df
--- /dev/null
+++ b/mods/phpdoc-config.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<phpdocumentor xmlns="https://www.phpdoc.org" configVersion="3.0">
+	<paths>
+		<output>../doc/api</output>
+		<cache>../doc/cache</cache>
+	</paths>
+	<version number="3.0">
+		<api>
+			<source dsn="../">
+				<path>src</path>
+				<path>mod</path>
+				<path>include</path>
+				<path>static</path>
+				<path>bin</path>
+				<path>view</path>
+			</source>
+			<ignore>
+				<path>vendor/**/*</path>
+				<path>asset/**/*</path>
+				<path>bin/dev/**/*</path>
+			</ignore>
+		</api>
+	</version>
+</phpdocumentor>
\ No newline at end of file