Migrate build from Maven to Gradle.

This commit is contained in:
Andreas Schildbach 2014-06-16 17:37:53 +02:00
parent cf09c0043b
commit de5db3cb98
10 changed files with 62 additions and 272 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
build/
.gradle/

5
build.gradle Normal file
View file

@ -0,0 +1,5 @@
allprojects {
repositories {
jcenter()
}
}

8
enabler/.gitignore vendored
View file

@ -1,4 +1,4 @@
target
.classpath
.project
.settings
/.classpath
/.project
/.settings/
/bin/

32
enabler/build.gradle Normal file
View file

@ -0,0 +1,32 @@
apply plugin: 'java'
apply plugin: 'eclipse'
dependencies {
compile 'com.google.guava:guava:18.0'
compile 'org.slf4j:slf4j-api:1.7.12'
compile 'com.google.code.findbugs:jsr305:3.0.0'
compile 'org.json:json:20090211' // provided by Android
compile 'net.sf.kxml:kxml2:2.3.0' // provided by Android
testCompile 'junit:junit:4.11'
testRuntime 'org.slf4j:slf4j-jdk14:1.7.12'
}
sourceSets {
main {
java.srcDirs = ['src']
resources.srcDirs = ['src']
}
test {
java.srcDirs = ['test']
resources.srcDirs = ['test']
}
}
compileJava {
sourceCompatibility '1.5'
targetCompatibility '1.5'
}
test {
exclude 'de/schildbach/pte/live/**'
}

View file

@ -1,111 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.schildbach.pte</groupId>
<artifactId>public-transport-enabler</artifactId>
<name>enabler</name>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>de.schildbach.pte</groupId>
<artifactId>base</artifactId>
<version>1</version>
</parent>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>18.0</version>
</dependency>
<!-- org.slf4j.* -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
</dependency>
<!-- javax.annotation.* -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- org.slf4j.* -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>1.7.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>test</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>de/schildbach/pte/live/**</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</project>

73
pom.xml
View file

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.schildbach.pte</groupId>
<artifactId>base</artifactId>
<name>base</name>
<version>1</version>
<packaging>pom</packaging>
<modules>
<module>enabler</module>
<module>service</module>
</modules>
<developers>
<developer>
<name>Andreas Schildbach</name>
<email>andreas@schildbach.de</email>
<url>http://schildbach.de</url>
</developer>
</developers>
<scm>
<url>http://code.google.com/p/public-transport-enabler/source/checkout</url>
<connection>scm:git:https://code.google.com/p/public-transport-enabler/</connection>
</scm>
<issueManagement>
<url>http://code.google.com/p/public-transport-enabler/issues/list</url>
</issueManagement>
<mailingLists>
<mailingList>
<name>public-transport-enabler-discuss Google Group</name>
<post>https://groups.google.com/forum/#!forum/public-transport-enabler-discuss</post>
</mailingList>
</mailingLists>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<pushChanges>false</pushChanges>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>

8
service/.gitignore vendored
View file

@ -1,4 +1,4 @@
target
.classpath
.project
.settings
/.classpath
/.project
/.settings/
/bin/

13
service/build.gradle Normal file
View file

@ -0,0 +1,13 @@
apply plugin: 'java'
apply plugin: 'eclipse'
dependencies {
compile project(':enabler')
compile 'org.springframework:spring-webmvc:3.1.0.RELEASE'
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.4'
}
compileJava {
sourceCompatibility '1.6'
targetCompatibility '1.6'
}

View file

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.schildbach.pte</groupId>
<artifactId>public-transport-service</artifactId>
<name>service</name>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>de.schildbach.pte</groupId>
<artifactId>base</artifactId>
<version>1</version>
</parent>
<developers>
<developer>
<name>Andreas Schildbach</name>
<email>andreas@schildbach.de</email>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>de.schildbach.pte</groupId>
<artifactId>public-transport-enabler</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
<dependency>
<groupId>net.sf.kxml</groupId>
<artifactId>kxml2</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

2
settings.gradle Normal file
View file

@ -0,0 +1,2 @@
include 'enabler'
include 'service'