From: <lh...@us...> - 2010-08-03 19:34:40
|
Revision: 404 http://tinytim.svn.sourceforge.net/tinytim/?rev=404&view=rev Author: lheuer Date: 2010-08-03 19:34:33 +0000 (Tue, 03 Aug 2010) Log Message: ----------- Updated build.gradle, removed Ant build Modified Paths: -------------- tinytim/trunk/build.gradle Removed Paths: ------------- tinytim/trunk/build.properties tinytim/trunk/build.xml tinytim/trunk/lib/ Modified: tinytim/trunk/build.gradle =================================================================== --- tinytim/trunk/build.gradle 2010-08-03 17:55:38 UTC (rev 403) +++ tinytim/trunk/build.gradle 2010-08-03 19:34:33 UTC (rev 404) @@ -25,16 +25,31 @@ mavenCentral() mavenRepo urls: 'http://www.tmapi.org/maven-repository/' mavenRepo urls: 'http://www.tmapi.org/maven-repository/snapshots/' + mavenRepo urls: 'http://repository.semagia.com/snapshots/' } +configurations { + compiledep +} + dependencies { compile group: 'org.tmapi', name: 'tmapi', version: '2.0.2' - compile files('lib/semagia-mio-0.9.5.jar') - testCompile group: 'junit', name: 'junit', version: '4.+' + compiledep 'com.semagia.mio:mio-core:0.9.6-SNAPSHOT' + + testCompile group: 'junit', name: 'junit', version: '4.8.1' testCompile group: 'org.tmapi', name: 'tmapi-tests', version: '2.0.3-SNAPSHOT' + + // Make Eclipse happy + testCompile 'com.semagia.mio:mio-core:0.9.6-SNAPSHOT' } +sourceSets { + main { + compileClasspath = sourceSets.main.compileClasspath + configurations.compiledep + } +} + jar { manifest { attributes 'Implementation-Title': 'tinyTiM', 'Implementation-Version': version Deleted: tinytim/trunk/build.properties =================================================================== --- tinytim/trunk/build.properties 2010-08-03 17:55:38 UTC (rev 403) +++ tinytim/trunk/build.properties 2010-08-03 19:34:33 UTC (rev 404) @@ -1,4 +0,0 @@ -version=2.0.1 -version_suffix=-SNAPSHOT -debug=off -optimize=on Deleted: tinytim/trunk/build.xml =================================================================== --- tinytim/trunk/build.xml 2010-08-03 17:55:38 UTC (rev 403) +++ tinytim/trunk/build.xml 2010-08-03 19:34:33 UTC (rev 404) @@ -1,303 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<project name="tinyTiM" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> - <property file="build.properties"/> - - <property name="dir.src" value="${basedir}/src/main/java"/> - <property name="dir.test" value="${basedir}/src/test/java"/> - <property name="dir.lib" value="${basedir}/lib"/> - <property name="dir.res" value="${basedir}/src/main/resources"/> - <property name="dir.coverage" value="${basedir}/coverage"/> - - <property name="lib.junit" value="${dir.lib}/junit-4.8.1.jar"/> - <property name="lib.mio" value="${dir.lib}/semagia-mio-0.9.5.jar"/> - <property name="lib.tmapi" value="${dir.lib}/tmapi-2.0.2.jar"/> - <property name="lib.tmapi.tests" value="${dir.lib}/tmapi-tests-2.0.2.jar"/> - <property name="lib.emma" value="${dir.lib}/emma.jar"/> - <property name="lib.emma.task" value="${dir.lib}/emma_ant.jar"/> - - <!-- directory that contains emma.jar and emma_ant.jar: --> - <property name="dir.emma" value="${dir.lib}" /> - - <!-- path element used by EMMA taskdef below: --> - <path id="emma.lib" > - <pathelement location="${dir.emma}/emma.jar" /> - <pathelement location="${dir.emma}/emma_ant.jar" /> - </path> - - <!-- this loads <emma> and <emmajava> custom tasks: --> - <taskdef resource="emma_ant.properties" classpathref="emma.lib" /> - - <target name="help"> - <echo message="--------------------"/> - <echo message="tinyTiM - Build file"/> - <echo message="--------------------"/> - <echo message=""/> - <echo message="Available targets:"/> - <echo message=""/> - <echo message=" jar Creates the jar"/> - <echo message=" testjar Creates the jar with the tests"/> - <echo message=" doc Creates the API documentation"/> - <echo message=" coverage Creates a coverage report"/> - <echo message=" release Creates the jar and a distributable file"/> - </target> - - <target name="init"> - <property name="dist.version" value="${version}${version_suffix}"/> - <property name="dist.name" value="tinytim-${dist.version}"/> - - <property name="tinytim.jar" value="${dist.name}.jar"/> - <property name="tinytim-test.jar" value="tinytim-tests-${dist.version}.jar"/> - <property name="tinytim.tar" value="${dist.name}.tar"/> - <property name="tinytim.tar.gz" value="${tinytim.tar}.gz"/> - <property name="tinytim.zip" value="${dist.name}.zip"/> - <property name="tinytim.pom" value="${dist.name}.pom"/> - <property name="tinytim-test.pom" value="tinytim-tests-${dist.version}.pom"/> - - <property name="dir.build" value="${basedir}/build"/> - <property name="dir.dist.root" value="${dir.build}/dist"/> - <property name="dir.dist" value="${dir.dist.root}/${dist.name}"/> - <property name="dir.build.classes" value="${dir.build}/classes"/> - <property name="dir.build.tests" value="${dir.build}/tests"/> - <property name="dir.javadocs" value="${dir.dist}/docs/api"/> - - <path id="run.classpath" > - <pathelement location="${dir.build.classes}" /> - <pathelement location="${dir.build.tests}" /> - <pathelement location="${lib.junit}"/> - <pathelement location="${lib.mio}"/> - <pathelement location="${lib.tmapi}"/> - <pathelement location="${lib.tmapi.tests}"/> - </path> - </target> - - <!-- =================================================================== --> - <!-- Clean targets --> - <!-- =================================================================== --> - <target name="clean" depends="init"> - <delete dir="${dir.build}"/> - <delete dir="${dir.javadocs}"/> - </target> - - <!-- =================================================================== --> - <!-- Prepares the build directory --> - <!-- =================================================================== --> - <target name="prepare" depends="init"> - <mkdir dir="${dir.build}"/> - <mkdir dir="${dir.build.classes}"/> - </target> - - <!-- =================================================================== --> - <!-- Coverage Tests --> - <!-- =================================================================== --> - <target name="coverage" depends="compile"> - <mkdir dir="${dir.build.tests}"/> - <javac destdir="${dir.build.tests}" - debug="${debug}" - optimize="${optimize}" - target="1.5" - includeantruntime="false"> - <classpath> - <pathelement location="${dir.build.classes}"/> - <pathelement location="${lib.junit}"/> - <pathelement location="${lib.mio}"/> - <pathelement location="${lib.tmapi}"/> - <pathelement location="${lib.tmapi.tests}"/> - </classpath> - <src path="${dir.test}"/> - </javac> - <mkdir dir="${dir.coverage}"/> - <emmajava libclasspathref="emma.lib" - sourcepath="${dir.src}" - fullmetadata="yes" - classname="org.tinytim.core.AllTests" - classpathref="run.classpath" - > - <filter includes="org.tinytim.*" excludes="org.tinytim.*Test*, org.tinytim.*$*" /> - <html outfile="${dir.coverage}/index.html" /> - </emmajava> - </target> - - <!-- =================================================================== --> - <!-- Tests --> - <!-- =================================================================== --> - <target name="test" depends="compile"> - <mkdir dir="${dir.build.tests}"/> - <javac destdir="${dir.build.tests}" - debug="${debug}" - optimize="${optimize}" - target="1.5" - includeantruntime="false"> - <classpath> - <pathelement location="${dir.build.classes}"/> - <pathelement location="${lib.junit}"/> - <pathelement location="${lib.mio}"/> - <pathelement location="${lib.tmapi}"/> - <pathelement location="${lib.tmapi.tests}"/> - </classpath> - <src path="${dir.test}"/> - </javac> - <junit printsummary="true" showoutput="false" - errorProperty="test.failed" failureProperty="test.failed" - fork="true"> - <classpath refid="run.classpath"/> - <formatter type="brief" usefile="false"/> - <test name="org.tinytim.core.AllTests"/> - </junit> - <fail message="Tests failed. Check test output." if="test.failed"/> - </target> - - <!-- =================================================================== --> - <!-- Compile source files --> - <!-- =================================================================== --> - <target name="compile" depends="clean, prepare"> - <replace file="${dir.src}/org/tinytim/Version.java" token="@RELEASE@" value="${dist.version}"/> - <javac destdir="${dir.build.classes}" - debug="${debug}" - target="1.5" - includeantruntime="false"> - <classpath> - <pathelement location="${lib.tmapi}"/> - <pathelement location="${lib.mio}"/> - </classpath> - <src path="${dir.src}"/> - </javac> - <replace file="${dir.src}/org/tinytim/Version.java" token="${dist.version}" value="@RELEASE@"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the Java Docs --> - <!-- =================================================================== --> - <target name="doc" depends="init"> - <mkdir dir="${dir.javadocs}"/> - <javadoc destdir="${dir.javadocs}" - packagenames="org.tinytim.*" - author="true" - version="true" - use="true" - splitindex="true" - noindex="false" - link="http://www.tmapi.org/2.0/api/" - windowtitle="tinyTiM API v${dist.version}" - doctitle="tinyTiM API v${dist.version}"> - <fileset dir="${dir.src}"> - <exclude name="org/tinytim/core/**"/> - <exclude name="org/tinytim/index/**"/> - <exclude name="org/tinytim/internal/**"/> - <exclude name="org/tinytim/utils/Property.*"/> - </fileset> -<!-- - <doclet name="net.gleamynode.apiviz.APIviz" - path="${dir.lib}/apiviz-1.2.4.GA.jar"> - </doclet> ---> - </javadoc> - </target> - - <!-- =================================================================== --> - <!-- Creates the jar --> - <!-- =================================================================== --> - <target name="jar" depends="compile"> - <jar destfile="${dir.build}/${tinytim.jar}"> - <fileset dir="${dir.build.classes}"> - <include name="**/*.*"/> - </fileset> - <fileset dir="${dir.res}"> - <include name="**/*.*"/> - </fileset> - <manifest> - <attribute name="Implementation-Title" value="tinyTiM"/> - <attribute name="Implementation-Version" value="${dist.version}"/> - <attribute name="Implementation-URL" value="http://tinytim.sourceforge.net/"/> - <attribute name="Import-Package" value="org.tmapi.core,org.tmapi.index"/> - <attribute name="Export-Package" value="org.tinytim.mio,org.tinytim.voc"/> - <attribute name="Bundle-Name" value="tinyTiM"/> - <attribute name="Bundle-SymbolicName" value="org.tinytim;version=${dist.version}"/> - <attribute name="Bundle-Vendor" value="tinyTiM project"/> - <attribute name="Bundle-Version" value="${dist.version}"/> - </manifest> - </jar> - <checksum file="${dir.build}/${tinytim.jar}" algorithm="sha1"/> - <antcall target="pom"> - <param name="pom-file" value="${tinytim.pom}"/> - <param name="artifact" value="tinytim"/> - </antcall> - <checksum file="${dir.build}/${tinytim.pom}" algorithm="sha1"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the test jar --> - <!-- =================================================================== --> - <target name="testjar" depends="compile, test"> - <jar destfile="${dir.build}/${tinytim-test.jar}"> - <fileset dir="${dir.build.tests}"> - <include name="**/*.*"/> - </fileset> - <manifest> - <attribute name="Implementation-Title" value="tinyTiM Tests"/> - <attribute name="Implementation-Version" value="${dist.version}"/> - <attribute name="Implementation-URL" value="http://tinytim.sourceforge.net/"/> - </manifest> - </jar> - <checksum file="${dir.build}/${tinytim-test.jar}" algorithm="sha1"/> - <antcall target="pom"> - <param name="pom-file" value="${tinytim-test.pom}"/> - <param name="artifact" value="tinytim-test"/> - </antcall> - <checksum file="${dir.build}/${tinytim-test.pom}" algorithm="sha1"/> - </target> - - <target name="pom"> - <echoxml file="${dir.build}/${pom-file}" namespacePolicy="elementsOnly"> - <project xmlns="http://maven.apache.org/POM/4.0.0"> - <modelVersion>4.0.0</modelVersion> - <groupId>org.tmapi</groupId> - <artifactId>${artifact}</artifactId> - <version>${dist.version}</version> - </project> - </echoxml> - </target> - - <!-- =================================================================== --> - <!-- Prepares a distribution --> - <!-- =================================================================== --> - <target name="dist" depends="jar, testjar, doc"> - <mkdir dir="${dir.dist}"/> - - <copy todir="${dir.dist}" file="${dir.build}/${tinytim.jar}"/> - <copy todir="${dir.dist}" file="${dir.build}/${tinytim-test.jar}"/> - - <copy todir="${dir.dist}/src"> - <fileset dir="${dir.src}"/> - </copy> - <replace file="${dir.dist}/src/org/tinytim/Version.java" token="@RELEASE@" value="${dist.version}"/> - <copy todir="${dir.dist}/test"> - <fileset dir="${dir.test}"/> - </copy> - <copy todir="${dir.dist}/lib"> - <fileset dir="${dir.lib}"> - <include name="tmapi*"/> - <include name="junit*"/> - <include name="LICENSE.tmapi*"/> - <include name="LICENSE.junit*"/> - </fileset> - </copy> - - <copy todir="${dir.dist}" file="CHANGES.txt"/> - <copy todir="${dir.dist}" file="LICENSE.txt"/> - <copy todir="${dir.dist}" file="README.txt"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the distribution files (.zip and .tar.gz) --> - <!-- --> - <!-- Won't create the distribution files if a test fails --> - <!-- =================================================================== --> - <target name="release" depends="jar, test, dist"> - <tar destfile="${dir.dist.root}/${tinytim.tar}" - basedir="${dir.dist.root}"/> - <gzip src="${dir.dist.root}/${tinytim.tar}" - destfile="${dir.build}/${tinytim.tar.gz}" /> - <delete file="${dir.dist.root}/${tinytim.tar}" /> - <zip destfile="${dir.build}/${tinytim.zip}" basedir="${dir.dist.root}"/> - </target> -</project> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |