summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik De Rijcke <derijcke.erik@gmail.com>2015-02-10 22:20:37 +0100
committerErik De Rijcke <derijcke.erik@gmail.com>2015-02-10 22:20:37 +0100
commit17c76c859bb8b8b490749101c2654144f48836f1 (patch)
tree67e08f7cfe62969da40628f52219323de3f030e1
parentc53d3cc58e0a2e9eb7dcc022f5c42910cc246f9b (diff)
migrate to maven
-rw-r--r--build.gradle51
-rw-r--r--examples/build.gradle33
-rw-r--r--examples/pom.xml17
-rw-r--r--generator/build.gradle9
-rw-r--r--generator/pom.xml47
-rw-r--r--pom.xml17
-rw-r--r--settings.gradle3
-rw-r--r--stubs/build.gradle23
-rw-r--r--stubs/pom.xml28
-rw-r--r--wayland/build.gradle34
-rw-r--r--wayland/pom.xml28
11 files changed, 137 insertions, 153 deletions
diff --git a/build.gradle b/build.gradle
deleted file mode 100644
index ecb37a2..0000000
--- a/build.gradle
+++ /dev/null
@@ -1,51 +0,0 @@
-if (JavaVersion.current().isJava8Compatible()) {
- allprojects {
- tasks.withType(Javadoc) {
- options.addStringOption('Xdoclint:none', '-quiet')
- }
- }
-}
-
-allprojects {
- apply plugin: 'java'
- apply plugin: 'maven'
-
- sourceCompatibility = JavaVersion.VERSION_1_6
-
- group = 'org.freedesktop'
- version = '1.1.0'
-
- repositories {
- mavenCentral()
- }
-}
-
-def exportedProjects = [
- ":stubs",
- ":wayland",
-]
-
-task alljavadoc(type: Javadoc) {
- source exportedProjects.collect { project(it).sourceSets.main.allJava }
- classpath = files(exportedProjects.collect { project(it).sourceSets.main.compileClasspath })
- destinationDir = file("${buildDir}/docs/javadoc")
-}
-
-alljavadoc.dependsOn(":wayland:compileJava")
-
-task sourcesJar(type: Jar, dependsOn: classes) {
- classifier = 'sources'
- from sourceSets.main.allSource
-}
-
-task javadocJar(type: Jar, dependsOn: javadoc) {
- classifier = 'javadoc'
- from javadoc.destinationDir
-}
-
-artifacts {
- archives jar
-
- archives sourcesJar
- archives javadocJar
-}
diff --git a/examples/build.gradle b/examples/build.gradle
deleted file mode 100644
index f5348f8..0000000
--- a/examples/build.gradle
+++ /dev/null
@@ -1,33 +0,0 @@
-//Copyright 2015 Erik De Rijcke
-//
-//Licensed under the Apache License,Version2.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.
-description = 'Examples for the Wayland protocol Java classes'
-
-apply plugin: 'java'
-apply plugin: 'maven'
-
-sourceCompatibility = JavaVersion.VERSION_1_6
-
-group = 'org.freedesktop'
-version = '1.1.0-SNAPSHOT'
-
-repositories {
- mavenLocal()
- mavenCentral()
-}
-
-dependencies {
- compile(
- 'org.freedesktop:wayland:1.1.0-SNAPSHOT'
- )
-} \ No newline at end of file
diff --git a/examples/pom.xml b/examples/pom.xml
new file mode 100644
index 0000000..8dc8f2c
--- /dev/null
+++ b/examples/pom.xml
@@ -0,0 +1,17 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <groupId>org.freedesktop</groupId>
+ <artifactId>examples</artifactId>
+ <version>1.0</version>
+
+
+ <dependencies>
+
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/generator/build.gradle b/generator/build.gradle
deleted file mode 100644
index 4dcca42..0000000
--- a/generator/build.gradle
+++ /dev/null
@@ -1,9 +0,0 @@
-description = 'Lib for auto-generating Wayland protocol Java classes'
-
-dependencies {
- compile('com.squareup:javawriter:2.5.0',
- 'com.google.guava:guava:17.0',
- project(":stubs")
- )
-}
-
diff --git a/generator/pom.xml b/generator/pom.xml
new file mode 100644
index 0000000..ec77fef
--- /dev/null
+++ b/generator/pom.xml
@@ -0,0 +1,47 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <parent>
+ <groupId>org.freedesktop</groupId>
+ <artifactId>wayland-java-bindings</artifactId>
+ <version>1.1.0</version>
+ </parent>
+
+ <artifactId>generator</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>18.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.squareup</groupId>
+ <artifactId>javawriter</artifactId>
+ <version>2.5.0</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <!--Stupid maven, we don't want to run the generator processor on itself... -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <compilerArgument>-proc:none</compilerArgument>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project> \ No newline at end of file
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..eafcf06
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,17 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.freedesktop</groupId>
+ <artifactId>wayland-java-bindings</artifactId>
+ <version>1.1.0</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>stubs</module>
+ <module>generator</module>
+ <module>wayland</module>
+ </modules>
+</project> \ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index 8cc3a48..0000000
--- a/settings.gradle
+++ /dev/null
@@ -1,3 +0,0 @@
-include 'stubs', 'generator', 'wayland'
-
-
diff --git a/stubs/build.gradle b/stubs/build.gradle
deleted file mode 100644
index 0ade098..0000000
--- a/stubs/build.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-//Copyright 2015 Erik De Rijcke
-//
-//Licensed under the Apache License,Version2.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.
-description = 'Java stub for wayland client and server protocols.'
-
-dependencies {
- testCompile group: 'junit', name: 'junit', version: '4.+'
- compile(
- 'com.google.code.findbugs:jsr305:3.0.0',
- 'net.java.dev.jna:jna:4.1.0'
- )
-}
-
diff --git a/stubs/pom.xml b/stubs/pom.xml
new file mode 100644
index 0000000..216442d
--- /dev/null
+++ b/stubs/pom.xml
@@ -0,0 +1,28 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.freedesktop</groupId>
+ <artifactId>wayland-java-bindings</artifactId>
+ <version>1.1.0</version>
+ </parent>
+
+ <artifactId>stubs</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ <version>3.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>net.java.dev.jna</groupId>
+ <artifactId>jna</artifactId>
+ <version>4.1.0</version>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/wayland/build.gradle b/wayland/build.gradle
deleted file mode 100644
index e92d508..0000000
--- a/wayland/build.gradle
+++ /dev/null
@@ -1,34 +0,0 @@
-description = 'Auto-generated Wayland protocol Java classes'
-
-def generatedSources = "$buildDir/generated-src"
-def generatedOutputDir = file("$generatedSources")
-
-compileJava {
- doFirst {
- generatedOutputDir.exists() || generatedOutputDir.mkdirs()
- options.compilerArgs = [
- '-s', "${generatedSources}"
- ]
- }
-}
-
-sourceSets {
- main {
- java {
- srcDirs += generatedOutputDir
- }
- }
-}
-
-javadoc {
- source = sourceSets.main.resources
-}
-
-dependencies {
- compile(
- project(":stubs"),
- project(":generator")
- )
-}
-
-compileJava.dependsOn clean \ No newline at end of file
diff --git a/wayland/pom.xml b/wayland/pom.xml
new file mode 100644
index 0000000..2775234
--- /dev/null
+++ b/wayland/pom.xml
@@ -0,0 +1,28 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.freedesktop</groupId>
+ <artifactId>wayland-java-bindings</artifactId>
+ <version>1.1.0</version>
+ </parent>
+
+ <artifactId>wayland</artifactId>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>stubs</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>generator</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project> \ No newline at end of file