Skip to content

Commit fb7c2b0

Browse files
authored
Adding bundle related logic to the build (#8)
* fixing build * adding untracked changes because we need them * remove .DS_Store stuff
1 parent 2e09922 commit fb7c2b0

File tree

4 files changed

+99
-0
lines changed

4 files changed

+99
-0
lines changed

pom-local-install.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>java-pti</groupId>
5+
<artifactId>java-pti</artifactId>
6+
<version>1</version>
7+
<packaging>pom</packaging>
8+
9+
<parent>
10+
<groupId>rcp_parent</groupId>
11+
<artifactId>rcp_parent</artifactId>
12+
<version>1</version>
13+
<relativePath>../rcp-build/pom_build/</relativePath>
14+
</parent>
15+
16+
<properties>
17+
<java.pti.version>1.13.0</java.pti.version>
18+
</properties>
19+
20+
<modules>
21+
<module>releng</module>
22+
</modules>
23+
</project>

releng/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
maven/

releng/pom.xml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>java-pti-install-local</groupId>
5+
<artifactId>java-pti-install-local</artifactId>
6+
<version>1</version>
7+
<packaging>pom</packaging>
8+
9+
<parent>
10+
<groupId>java-pti</groupId>
11+
<artifactId>java-pti</artifactId>
12+
<version>1</version>
13+
<relativePath>../pom-local-install.xml</relativePath>
14+
</parent>
15+
16+
17+
<properties>
18+
<target.destination>../updates</target.destination>
19+
</properties>
20+
21+
<build>
22+
<plugins>
23+
<plugin>
24+
<artifactId>maven-clean-plugin</artifactId>
25+
<version>3.3.2</version>
26+
<configuration>
27+
<filesets>
28+
<fileset>
29+
<directory>${target.destination}</directory>
30+
<followSymlinks>false</followSymlinks>
31+
</fileset>
32+
</filesets>
33+
</configuration>
34+
</plugin>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-install-plugin</artifactId>
38+
<version>2.5.2</version>
39+
<executions>
40+
<execution>
41+
<id>install-external</id>
42+
<phase>process-resources</phase>
43+
<configuration>
44+
<file>${basedir}/../silabs-pti/build/libs/silabs-pti-lib-${java.pti.version}.jar</file>
45+
<repositoryLayout>default</repositoryLayout>
46+
<groupId>com.silabs.pti</groupId>
47+
<artifactId>com.silabs.external.silabs_pti</artifactId>
48+
<version>${java.pti.version}</version>
49+
<packaging>jar</packaging>
50+
<generatePom>true</generatePom>
51+
<localRepositoryPath>maven</localRepositoryPath>
52+
</configuration>
53+
<goals>
54+
<goal>install-file</goal>
55+
</goals>
56+
</execution>
57+
</executions>
58+
</plugin>
59+
</plugins>
60+
</build>
61+
</project>

silabs-pti/build.gradle

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import java.nio.file.Paths
33
plugins {
44
id 'application'
55
id 'java'
6+
id "biz.aQute.bnd.builder" version "7.0.0"
67
}
78

89
project.ext.set('archiveName', 'silabs-pti-lib')
@@ -59,6 +60,19 @@ jar {
5960
manifest {
6061
attributes(project.manifestMap)
6162
}
63+
// OSGi metadata using BND
64+
bundle {
65+
bnd(
66+
"Bundle-Name": "silabs-pti-lib",
67+
"Bundle-Vendor": "Silicon Labs",
68+
"Bundle-SymbolicName": "com.silabs.external.silabs_pti",
69+
"Bundle-Version": project.silabsPtiVersion,
70+
"Bundle-RequiredExecutionEnvironment": "JavaSE-11",
71+
"Bundle-ActivationPolicy": "lazy",
72+
"Main-Class": project.mainClass,
73+
"-exportcontents": "com.silabs.pti.*"
74+
)
75+
}
6276
}
6377

6478
task createDebugMessageTypes() {

0 commit comments

Comments
 (0)