Skip to content

Commit d086bb6

Browse files
committed
Gradle updates, use ihmc-build plugin
1 parent e1bc258 commit d086bb6

File tree

9 files changed

+52
-421
lines changed

9 files changed

+52
-421
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ bin/
4343
.DS_Store
4444

4545
cppbuild/
46+
src/test/build
4647

4748
hs_err*

build.gradle.kts

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,25 @@
11
plugins {
2-
id("java-library")
3-
id("maven-publish")
2+
id("java")
3+
id("us.ihmc.ihmc-build")
44
}
55

6-
group = "us.ihmc"
7-
version = "5.0.0"
6+
ihmc {
7+
group = "us.ihmc"
8+
version = "5.0.0"
9+
vcsUrl = "https://github.com/ihmcrobotics/zed-java-api"
10+
openSource = true
11+
description = "Use Stereolabs sensors such as ZED 2, ZED 2i, ZED X, ZED Mini, ZED X Mini from Java."
812

9-
repositories {
10-
mavenCentral()
13+
configureDependencyResolution()
14+
configurePublications()
1115
}
1216

13-
java {
14-
withSourcesJar()
17+
tasks.javadoc {
18+
// The javadoc compiler has a lot of errors with the javacpp generated comments, but we need a javadoc.jar for publishing
19+
exclude("us/ihmc/zed/**")
1520
}
1621

17-
publishing {
18-
publications {
19-
create<MavenPublication>("mavenJava") {
20-
from(components["java"])
21-
22-
groupId = project.group.toString()
23-
artifactId = "zed-java-api"
24-
version = project.version.toString()
25-
}
26-
}
27-
28-
repositories {
29-
maven {
30-
val releasesRepo = uri("https://s01.oss.sonatype.org/content/repositories/releases")
31-
val snapshotsRepo = uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
32-
url = if (version.toString().endsWith("SNAPSHOT")) snapshotsRepo else releasesRepo
33-
34-
credentials {
35-
username = project.findProperty("publishUsername").toString()
36-
password = project.findProperty("publishPassword").toString()
37-
}
38-
}
39-
}
40-
}
41-
42-
dependencies {
22+
mainDependencies {
4323
// Transitive dependencies
4424
api("us.ihmc:javacpp:1.5.11-ihmc-2") {
4525
isTransitive = true
@@ -50,25 +30,18 @@ dependencies {
5030
api("us.ihmc:ihmc-native-library-loader:2.0.4") {
5131
isTransitive = true
5232
}
53-
54-
testImplementation(platform("org.junit:junit-bom:5.9.1"))
55-
testImplementation("org.junit.jupiter:junit-jupiter")
56-
57-
// OpenCV for demos
58-
val openblasVersion = "0.3.28-1.5.11-ihmc-2"
59-
testImplementation("us.ihmc:openblas:$openblasVersion")
60-
testImplementation("us.ihmc:openblas:$openblasVersion:linux-x86_64")
61-
testImplementation("us.ihmc:openblas:$openblasVersion:linux-arm64")
62-
testImplementation("us.ihmc:openblas:$openblasVersion:windows-x86_64")
63-
val opencvVersion = "4.10.0-1.5.11-ihmc-2"
64-
testImplementation("us.ihmc:opencv:$opencvVersion")
65-
testImplementation("us.ihmc:opencv:$opencvVersion:linux-arm64")
66-
testImplementation("us.ihmc:opencv:$opencvVersion:linux-x86_64")
67-
testImplementation("us.ihmc:opencv:$opencvVersion:linux-x86_64-gpu")
68-
testImplementation("us.ihmc:opencv:$opencvVersion:windows-x86_64")
69-
testImplementation("us.ihmc:opencv:$opencvVersion:windows-x86_64-gpu")
7033
}
7134

72-
tasks.test {
73-
useJUnitPlatform()
35+
testDependencies {
36+
// OpenCV for demos
37+
val openblasVersion = "0.3.28-1.5.11-ihmc-2"
38+
implementation("us.ihmc:openblas:$openblasVersion")
39+
implementation("us.ihmc:openblas:$openblasVersion:linux-x86_64")
40+
implementation("us.ihmc:openblas:$openblasVersion:linux-arm64")
41+
implementation("us.ihmc:openblas:$openblasVersion:windows-x86_64")
42+
val opencvVersion = "4.10.0-1.5.11-ihmc-2"
43+
implementation("us.ihmc:opencv:$opencvVersion")
44+
implementation("us.ihmc:opencv:$opencvVersion:linux-arm64")
45+
implementation("us.ihmc:opencv:$opencvVersion:linux-x86_64")
46+
implementation("us.ihmc:opencv:$opencvVersion:windows-x86_64")
7447
}

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
title = zed-java-api
2+
extraSourceSets = ["test"]
3+
publishUrl = local
4+
compositeSearchHeight = 0
5+
excludeFromCompositeBuild = false

gradle/wrapper/gradle-wrapper.jar

-42.6 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 0 additions & 7 deletions
This file was deleted.

gradlew

Lines changed: 0 additions & 252 deletions
This file was deleted.

0 commit comments

Comments
 (0)