Skip to content

Commit c7661f9

Browse files
committed
write pom files
1 parent 241f30f commit c7661f9

File tree

5 files changed

+153
-0
lines changed

5 files changed

+153
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@ Processing for Android
22
======================
33

44
This is the main repository for Processing for Android. It includes the core library inside the core folder, and the mode itself in the root. See the [wiki](https://github.com/processing/processing-android/wiki) for build instructions.
5+
6+
The core and VR libraries are available on JCentral, so they can be easily imported
7+
into Gradle projects:
8+
9+
[processing-core](https://bintray.com/p5android/processing-android/processing-core)
10+
[processing-vr](https://bintray.com/p5android/processing-android/processing-vr)
11+
12+

core/build.gradle

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ buildscript {
77
classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.9'
88
}
99
}
10+
apply plugin: 'maven'
1011

1112
dependencies {
1213
compile name: 'android'
@@ -44,6 +45,45 @@ import groovy.util.AntBuilder
4445
import java.nio.file.Files
4546
import static java.nio.file.StandardCopyOption.*;
4647

48+
// Creates the pom file, but for now let's just use the template in the core folder
49+
task createPom {
50+
pom {
51+
project {
52+
groupId 'org.p5android'
53+
artifactId 'processing-core'
54+
version '4.0.1'
55+
packaging 'jar'
56+
licenses {
57+
license {
58+
name 'GNU Lesser General Public License, version 2.1'
59+
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
60+
distribution 'repo'
61+
}
62+
}
63+
}
64+
}.writeTo("$buildDir/libs/core.pom")
65+
}
66+
67+
task sourcesJar(type: Jar, dependsOn: classes) {
68+
classifier = 'sources'
69+
from sourceSets.main.allSource
70+
}
71+
72+
// Does not work because of Processing-specific tags in source code, such as @webref
73+
task javadocJar(type: Jar, dependsOn: javadoc) {
74+
classifier = 'javadoc'
75+
from javadoc.destinationDir
76+
}
77+
78+
artifacts {
79+
// archives javadocJar
80+
archives sourcesJar
81+
}
82+
83+
jar.doLast { task ->
84+
ant.checksum file: task.archivePath
85+
}
86+
4787
task dist {
4888
doLast {
4989
// make copy of jar file as zip

core/pom.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.p5android</groupId>
6+
<artifactId>processing-core</artifactId>
7+
<version>4.0.1</version>
8+
<packaging>jar</packaging>
9+
<licenses>
10+
<license>
11+
<name>GNU Lesser General Public License, version 2.1</name>
12+
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
13+
<distribution>repo</distribution>
14+
</license>
15+
</licenses>
16+
<dependencies>
17+
<dependency>
18+
<groupId>com.google.android.support</groupId>
19+
<artifactId>support-v4</artifactId>
20+
<version>25.3.1</version>
21+
<scope>compile</scope>
22+
</dependency>
23+
<dependency>
24+
<groupId>com.google.android.support</groupId>
25+
<artifactId>wearable</artifactId>
26+
<version>2.0.5</version>
27+
<scope>compile</scope>
28+
</dependency>
29+
</dependencies>
30+
</project>

libraries/vr/build.gradle

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ buildscript {
77
classpath group: 'org.zeroturnaround', name: 'zt-zip', version: '1.9'
88
}
99
}
10+
apply plugin: 'maven'
1011

1112
dependencies {
1213
compile name: 'android'
@@ -44,6 +45,45 @@ import groovy.util.AntBuilder
4445
import java.nio.file.Files
4546
import static java.nio.file.StandardCopyOption.*;
4647

48+
// Creates the pom file, but for now let's just use the template in the core folder
49+
task createPom {
50+
pom {
51+
project {
52+
groupId 'org.p5android'
53+
artifactId 'processing-vr'
54+
version '4.0.1'
55+
packaging 'jar'
56+
licenses {
57+
license {
58+
name 'GNU Lesser General Public License, version 2.1'
59+
url 'https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt'
60+
distribution 'repo'
61+
}
62+
}
63+
}
64+
}.writeTo("$buildDir/libs/vr.pom")
65+
}
66+
67+
task sourcesJar(type: Jar, dependsOn: classes) {
68+
classifier = 'sources'
69+
from sourceSets.main.allSource
70+
}
71+
72+
// Does not work because of Processing-specific tags in source code, such as @webref
73+
task javadocJar(type: Jar, dependsOn: javadoc) {
74+
classifier = 'javadoc'
75+
from javadoc.destinationDir
76+
}
77+
78+
artifacts {
79+
// archives javadocJar
80+
archives sourcesJar
81+
}
82+
83+
jar.doLast { task ->
84+
ant.checksum file: task.archivePath
85+
}
86+
4787
task dist {
4888
doLast {
4989
File vrJar = file("library/vr.jar");

libraries/vr/pom.xml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.p5android</groupId>
6+
<artifactId>processing-vr</artifactId>
7+
<version>4.0.1</version>
8+
<licenses>
9+
<license>
10+
<name>GNU Lesser General Public License, version 2.1</name>
11+
<url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
12+
<distribution>repo</distribution>
13+
</license>
14+
</licenses>
15+
<dependencies>
16+
<dependency>
17+
<groupId>org.p5android</groupId>
18+
<artifactId>processing-core</artifactId>
19+
<version>4.0.1</version>
20+
<scope>compile</scope>
21+
</dependency>
22+
<dependency>
23+
<groupId>com.google.vr</groupId>
24+
<artifactId>sdk-audio</artifactId>
25+
<version>1.120.0</version>
26+
<scope>compile</scope>
27+
</dependency>
28+
<dependency>
29+
<groupId>com.google.vr</groupId>
30+
<artifactId>sdk-base</artifactId>
31+
<version>1.120.0</version>
32+
<scope>compile</scope>
33+
</dependency>
34+
</dependencies>
35+
</project>

0 commit comments

Comments
 (0)