Skip to content

Commit a6f6a8a

Browse files
fix: publish step to include native libraries via gradle instead of vendordep
1 parent 6789598 commit a6f6a8a

3 files changed

Lines changed: 28 additions & 4 deletions

File tree

docs/vendordep/maple-sim.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"fileName": "maple-sim.json",
33
"name": "maplesim",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"frcYear": "2026",
66
"uuid": "c39481e8-4a63-4a4c-9df6-48d91e4da37b",
77
"mavenUrls": [
@@ -13,7 +13,7 @@
1313
{
1414
"groupId": "org.ironmaple",
1515
"artifactId": "maplesim-java",
16-
"version": "1.0.0"
16+
"version": "1.0.1"
1717
},
1818
{
1919
"groupId": "org.dyn4j",

project/build.gradle

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,13 @@ dependencies {
4646
runtimeOnly("com.github.stephengold:jolt-jni-Linux64:3.5.2:ReleaseDp")
4747
runtimeOnly("com.github.stephengold:jolt-jni-Windows64:3.5.2:ReleaseDp")
4848
runtimeOnly("com.github.stephengold:jolt-jni-MacOSX_ARM64:3.5.2:ReleaseDp")
49+
runtimeOnly("com.github.stephengold:jolt-jni-MacOSX64:3.5.2:ReleaseDp")
4950

5051
// 3D Physics Engine (Bullet via JNI) - LEGACY FALLBACK
51-
implementation("com.github.stephengold:Libbulletjme-MacOSX_ARM64:22.0.3")
52+
implementation("com.github.stephengold:Libbulletjme-Windows64:22.0.3")
53+
runtimeOnly("com.github.stephengold:Libbulletjme-Linux64:22.0.3")
54+
runtimeOnly("com.github.stephengold:Libbulletjme-MacOSX_ARM64:22.0.3")
55+
runtimeOnly("com.github.stephengold:Libbulletjme-MacOSX64:22.0.3")
5256

5357
// JSnapLoader for native library loading:
5458
api 'io.github.electrostat-lab:snaploader:1.1.1-stable'
@@ -70,6 +74,17 @@ dependencies {
7074
implementation 'edu.wpi.first.thirdparty.frc2024.opencv:opencv-java:4.8.0-2'
7175
}
7276

77+
def bundledJniJars = configurations.runtimeClasspath.filter {
78+
it.name.contains('jolt-jni') || it.name.contains('Libbulletjme')
79+
}
80+
81+
jar {
82+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
83+
from {
84+
bundledJniJars.collect { zipTree(it) }
85+
}
86+
}
87+
7388
// Set up exports properly
7489
nativeUtils {
7590
exportsConfigs {

project/publish.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apply plugin: 'maven-publish'
22

33
ext.licenseFile = files("$rootDir/LICENSE.txt")
44

5-
def pubVersion = '1.0.0'
5+
def pubVersion = '1.0.1'
66

77
def outputsFolder = file("$buildDir/outputs")
88

@@ -109,7 +109,16 @@ task javadocJar(type: Jar, dependsOn: javadoc) {
109109
task outputJar(type: Jar, dependsOn: classes) {
110110
archiveBaseName = javaBaseName
111111
destinationDirectory = outputsFolder
112+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
112113
from sourceSets.main.output
114+
def bundledJniJars = configurations.runtimeClasspath.filter {
115+
it.name.contains('jolt-jni') || it.name.contains('Libbulletjme')
116+
}
117+
from {
118+
bundledJniJars.collect {
119+
zipTree(it)
120+
}
121+
}
113122
}
114123

115124
task outputSourcesJar(type: Jar, dependsOn: classes) {

0 commit comments

Comments
 (0)