[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [metrics-base/master] Add ant task to fetch metrics-lib from dist.



commit 07c2a00c27f0d536223f8b5a61fc91e60eb524d4
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date:   Mon Sep 23 15:27:32 2019 +0200

    Add ant task to fetch metrics-lib from dist.
    
    Implements part of #31649.
---
 java/base.xml | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/java/base.xml b/java/base.xml
index 8342e91..4ce1660 100644
--- a/java/base.xml
+++ b/java/base.xml
@@ -28,6 +28,7 @@
   <property name="emptymanifest" value="${generated}/emptymanifest" />
   <property name="javadocstyle" value="${basedir}/src/build/java/stylesheet.css" />
   <property name="javadocicon" value="${basedir}/src/build/java/tor-onion.png" />
+  <property name="downloadedlibs" value="${generated}/downloaded-libs" />
 
   <!-- generic path definitions -->
   <path id="classpath">
@@ -99,6 +100,7 @@
     <mkdir dir="${docs}"/>
     <mkdir dir="${testresult}"/>
     <mkdir dir="${dist}"/>
+    <mkdir dir="${libs}"/>
     <manifest file="${emptymanifest}" />
   </target>
 
@@ -109,6 +111,20 @@
     <ivy:report todir="${generated}/ivy" />
   </target>
 
+  <target name="fetch-metrics-lib" depends="init"
+          description="Fetch metrics-lib from dist.torproject.org">
+    <mkdir dir="${downloadedlibs}"/>
+    <get src="https://dist.torproject.org/metrics-lib/${metricslibversion}/metrics-lib-${metricslibversion}.tar.gz";
+         dest="${downloadedlibs}"/>
+    <untar src="${downloadedlibs}/metrics-lib-${metricslibversion}.tar.gz"
+           dest="${libs}" compression="gzip">
+      <patternset>
+        <include name="**/metrics-lib-${metricslibversion}-thin.jar"/>
+      </patternset>
+      <mapper type="flatten"/>
+    </untar>
+  </target>
+
   <target name="compile"
           depends="init">
     <javac destdir="${classes}"

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits