Skip to content

Commit 1d9b252

Browse files
Merge pull request #6 from CommonWealthRobotics/kh/pointer-managment
Kh/pointer managment
2 parents d24b41d + 1854c90 commit 1d9b252

173 files changed

Lines changed: 105129 additions & 58 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "schema"]
2+
path = schema
3+
url = https://github.com/CommonWealthRobotics/mujoco-xml-schema-mjcf.git

GenerateXMLClasses.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
#cd schema
4+
5+
#xjc -nv -extension -d ../src/main/java/ -b customization.xjb mujoco.xsd
6+
7+
#cd ../
8+
9+
mvn generate-sources

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,18 @@ installing VC++ redist from:
6363
https://www.microsoft.com/en-gb/download/details.aspx?id=48145
6464
```
6565

66+
# Build
67+
68+
Windows `bash buiild-windows.sh`
69+
70+
Linux `bash build-linux.sh`
71+
72+
Mac x86 `bash build-mac.sh`
73+
74+
Mac arm64 `bash build-mac-m1.sh`
75+
76+
77+
6678
# HOWTO set up Publish
6779

6880
1. Export your gpg private key from the system that you have created it.

build.gradle

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
66
* User Manual available at https://docs.gradle.org/7.2/userguide/building_java_projects.html
77
*/
8-
98
plugins {
109
id 'eclipse'
1110
id 'java'
1211
id 'maven-publish'
1312
id 'signing'
1413
id 'io.codearte.nexus-staging' version '0.30.0'
15-
1614
}
1715

1816
repositories {
@@ -24,7 +22,13 @@ dependencies {
2422
// Use JUnit test framework.
2523
testImplementation 'junit:junit:4.13.2'
2624
implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.7'
25+
// https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
26+
implementation group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1'
27+
implementation 'net.codesup.util:jaxb2-rich-contract-plugin:2.1.0'
28+
2729
}
30+
31+
2832
if(JavaVersion.current() != JavaVersion.VERSION_1_8){
2933
throw new GradleException("This build must be run with java 8")
3034
}
@@ -35,7 +39,7 @@ archivesBaseName='mujoco-java'
3539
version = System.getenv("VERSION_SEMVER")
3640

3741
nexusStaging {
38-
packageGroup = 'com.neuronrobotics'
42+
packageGroup = 'com.neuronrobotics'
3943
serverUrl='https://oss.sonatype.org/service/local/'
4044
username = System.getenv("MAVEN_USERNAME")
4145
password = System.getenv("MAVEN_PASSWORD")
@@ -44,14 +48,14 @@ nexusStaging {
4448
publishing {
4549

4650
repositories {
47-
// maven {
48-
// name = 'GitHubPackages'
49-
// url = uri("https://maven.pkg.github.com/CommonWealthRobotics/mujoco-java")
50-
// credentials {
51-
// username = System.getenv("GITHUB_ACTOR")
52-
// password = System.getenv("GITHUB_TOKEN")
53-
// }
54-
// }
51+
// maven {
52+
// name = 'GitHubPackages'
53+
// url = uri("https://maven.pkg.github.com/CommonWealthRobotics/mujoco-java")
54+
// credentials {
55+
// username = System.getenv("GITHUB_ACTOR")
56+
// password = System.getenv("GITHUB_TOKEN")
57+
// }
58+
// }
5559
maven {
5660
name = "OSSRH"
5761
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"

pom.xml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
<project>
2+
<modelVersion>4.0.0</modelVersion>
3+
<artifactId>mujoco-java</artifactId>
4+
<name>mujoco-java</name>
5+
6+
<groupId>org.mujoco</groupId>
7+
<version>0.0.1-SNAPSHOT</version>
8+
<dependencies>
9+
<dependency>
10+
<groupId>net.codesup.util</groupId>
11+
<artifactId>jaxb2-rich-contract-plugin</artifactId>
12+
<version>2.0.0</version>
13+
</dependency>
14+
</dependencies>
15+
<build>
16+
<plugins>
17+
<plugin>
18+
<groupId>org.jvnet.jaxb2.maven2</groupId>
19+
<artifactId>maven-jaxb2-plugin</artifactId>
20+
<version>0.14.0</version>
21+
<executions>
22+
<execution>
23+
<id>xsd-generate</id>
24+
<phase>generate-sources</phase>
25+
<goals>
26+
<goal>generate</goal>
27+
</goals>
28+
</execution>
29+
</executions>
30+
<configuration>
31+
<schemaDirectory>schema/</schemaDirectory>
32+
<generateDirectory>src/main/java/</generateDirectory>
33+
<schemaIncludes>
34+
<schemaInclude>mujoco.xsd</schemaInclude>
35+
</schemaIncludes>
36+
<strict>false</strict>
37+
<verbose>true</verbose>
38+
<extension>true</extension>
39+
<removeOldOutput>false</removeOldOutput>
40+
<args>
41+
<arg>-Xconstrained-properties</arg>
42+
<arg>-constrained=y</arg>
43+
<arg>-bound=y</arg>
44+
<arg>-setterThrows=n</arg>
45+
<arg>-generateTools=y</arg>
46+
<arg>-Xclone</arg>
47+
<arg>-cloneThrows=y</arg>
48+
<arg>-Xcopy</arg>
49+
<arg>-partial=y</arg>
50+
<arg>-generateTools=y</arg>
51+
<arg>-constructor=y</arg>
52+
<arg>-narrow=n</arg>
53+
<arg>-selectorClassName=Selector</arg>
54+
<arg>-rootSelectorClassName=Select</arg>
55+
<arg>-Xgroup-contract</arg>
56+
<arg>-declareSetters=y</arg>
57+
<arg>-declareBuilderInterface=y</arg>
58+
<arg>-supportInterfaceNameSuffix=Lifecycle</arg>
59+
<arg>
60+
-upstreamEpisodeFile=META-INF/jaxb-interfaces.episode</arg>
61+
<arg>
62+
-downstreamEpisodeFile=/META-INF/jaxb-interfaces.episode</arg>
63+
64+
<arg>-Xfluent-builder</arg>
65+
<arg>-rootSelectorClassName=Select</arg>
66+
<arg>-newBuilderMethodName=builder</arg>
67+
<arg>-newCopyBuilderMethodName=newCopyBuilder</arg>
68+
<arg>-copyToMethodName=copyTo</arg>
69+
<arg>-builderFieldSuffix=_Builder</arg>
70+
<arg>-generateTools=y</arg>
71+
<arg>-narrow=n</arg>
72+
<arg>-copyPartial=y</arg>
73+
<arg>-selectorClassName=Selector</arg>
74+
<arg>-builderClassName=Builder</arg>
75+
<arg>-builderInterfaceName=BuildSupport</arg>
76+
<arg>-copyAlways=y</arg>
77+
<arg>-buildMethodName=build</arg>
78+
<arg>-endMethodName=end</arg>
79+
<arg>-Xmeta</arg>
80+
<arg>-generateTools=y</arg>
81+
<arg>-extended=n</arg>
82+
<arg>-camelCase=n</arg>
83+
<arg>-metaClassName=PropInfo</arg>
84+
<arg>-allowSet=y</arg>
85+
<arg>-visitMethodName=visit</arg>
86+
</args>
87+
<plugins>
88+
<plugin>
89+
<groupId>net.codesup.util</groupId>
90+
<artifactId>jaxb2-rich-contract-plugin</artifactId>
91+
<version>2.0.0</version>
92+
</plugin>
93+
</plugins>
94+
<dependencies>
95+
<!-- Put this in if your default JAXB version is 2.2 orlower,
96+
or if &quot;tools.jar&quot; isn't in your classpath -->
97+
<dependency>
98+
<groupId>org.glassfish.jaxb</groupId>
99+
<artifactId>jaxb-runtime</artifactId>
100+
<version>2.3</version>
101+
</dependency>
102+
<dependency>
103+
<groupId>org.glassfish.jaxb</groupId>
104+
<artifactId>jaxb-core</artifactId>
105+
<version>2.3</version>
106+
</dependency>
107+
<dependency>
108+
<groupId>org.glassfish.jaxb</groupId>
109+
<artifactId>jaxb-xjc</artifactId>
110+
<version>2.3</version>
111+
</dependency>
112+
</dependencies>
113+
</configuration>
114+
</plugin>
115+
</plugins>
116+
</build>
117+
</project>

schema

Submodule schema added at 4b4cfce
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" standalone="yes"?>
2+
<bindings version="2.1" xmlns="http://java.sun.com/xml/ns/jaxb" xmlns:kscs="http://www.kscs.com/util/jaxb/bindings">
3+
<!--
4+
5+
This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.3.0
6+
See <a href="https://javaee.github.io/jaxb-v2/">https://javaee.github.io/jaxb-v2/</a>
7+
Any modifications to this file will be lost upon recompilation of the source schema.
8+
Generated on: 2024.03.13 at 04:45:57 PM EDT
9+
10+
--></bindings>
11+

0 commit comments

Comments
 (0)