Skip to content

Commit

Permalink
Release lz4-pure-java artifact (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
odaira committed Oct 27, 2019
1 parent d43546e commit 55c8e6c
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 10 deletions.
30 changes: 20 additions & 10 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@

<property name="ivy.jar.version" value="2.2.0"/>
<property name="ivy.jar.name" value="ivy-${ivy.jar.version}.jar"/>
<condition property="ivy.xml.name" value="ivy-pure-java.xml" else="ivy.xml">
<istrue value="${lz4-pure-java}"/>
</condition>

<condition property="skip.jni" value="true">
<istrue value="${lz4-pure-java}"/>
</condition>

<condition property="platform" value="linux">
<os name="Linux"/>
Expand Down Expand Up @@ -95,7 +102,7 @@

<target name="init">
<tstamp />
<ivy:resolve conf="test" />
<ivy:resolve file="${ivy.xml.name}" conf="test" />
<ivy:retrieve />
</target>

Expand Down Expand Up @@ -325,7 +332,12 @@
</jar>
</target>

<target name="jar" description="generate JAR" depends="compile">
<target name="jar" description="generate JAR" depends="compile, -jar, -jar-pure-java">
<!-- Either one of -jar or -jar-pure-java is actually called,
depending on the value of the lz4-pure-java property. -->
</target>

<target name="-jar" unless="${lz4-pure-java}">
<mkdir dir="${dist}" />
<jar
destfile="${dist}/${ivy.module}.jar">
Expand All @@ -340,18 +352,16 @@
</jar>
</target>

<target name="jar-no-jni" description="generate JAR without native libraries">
<property name="skip.jni" value="true" />
<antcall target="-jar-no-jni" />
</target>

<target name="-jar-no-jni" depends="compile">
<target name="-jar-pure-java" if="${lz4-pure-java}">
<mkdir dir="${dist}" />
<jar
destfile="${dist}/${ivy.module}-no-jni-${ivy.revision}.jar">
destfile="${dist}/${ivy.module}.jar">
<fileset dir="${build}/classes" />
<fileset dir="${build}/unsafe-classes" />
<fileset dir="${build}/generated-classes" />
<manifest>
<attribute name="Automatic-Module-Name" value="org.lz4.pure.java"/>
</manifest>
</jar>
</target>

Expand All @@ -376,7 +386,7 @@

<target name="makepom" description="generate a pom file">
<ivy:makepom
ivyfile="${basedir}/ivy.xml"
ivyfile="${basedir}/${ivy.xml.name}"
pomfile="${dist}/${ivy.module}-${ivy.revision}.pom"
templatefile="${src}/build/pom.template">
<mapping conf="default" scope="compile" />
Expand Down
26 changes: 26 additions & 0 deletions ivy-pure-java.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<ivy-module version="2.0">
<info organisation="org.lz4" module="lz4-pure-java" revision="1.6-SNAPSHOT" />

<configurations defaultconfmapping="default->default">
<conf name="default" />
<conf name="test" extends="default" />
</configurations>

<dependencies>
<dependency org="com.carrotsearch.randomizedtesting" name="junit4-ant" rev="2.7.3" transitive="true" conf="test->*,!sources,!javadoc" />
</dependencies>
</ivy-module>
5 changes: 5 additions & 0 deletions lz4-pure-java.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Bundle-SymbolicName: lz4-pure-java
Bundle-Name: LZ4 Java Compression
Bundle-Version:${ivy.revision}
Export-Package: net.jpountz.*;version:=${packages.version}

0 comments on commit 55c8e6c

Please sign in to comment.