Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Nov 20, 2024
2 parents ea8868a + c88b77e commit 67567f8
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/javacpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,51 +10,51 @@ env:
STAGING_REPOSITORY: ${{ secrets.STAGING_REPOSITORY }}
jobs:
# android-arm:
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
android-arm64:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
# android-x86:
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
android-x86_64:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
ios-arm64:
runs-on: macos-14
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions
ios-x86_64:
runs-on: macos-12
runs-on: macos-13
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions
# linux-armhf:
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-arm64:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-riscv64:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-ppc64le:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
# linux-x86:
# runs-on: ubuntu-20.04
# runs-on: ubuntu-22.04
# steps:
# - uses: bytedeco/javacpp-presets/.github/actions/deploy-ubuntu@actions
linux-x86_64:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
CI_DEPLOY_OPTIONS: "" # to not skip tests
steps:
Expand All @@ -64,7 +64,7 @@ jobs:
steps:
- uses: bytedeco/javacpp-presets/.github/actions/deploy-macosx@actions
macosx-x86_64:
runs-on: macos-12
runs-on: macos-13
env:
CI_DEPLOY_OPTIONS: "" # to not skip tests
steps:
Expand All @@ -82,6 +82,6 @@ jobs:
redeploy:
# needs: [android-arm, android-arm64, android-x86, android-x86_64, ios-arm64, ios-x86_64, linux-armhf, linux-arm64, linux-ppc64le, linux-x86, linux-x86_64, macosx-arm64, macosx-x86_64, windows-x86, windows-x86_64]
needs: [android-arm64, android-x86_64, ios-arm64, ios-x86_64, linux-arm64, linux-riscv64, linux-ppc64le, linux-x86_64, macosx-arm64, macosx-x86_64, windows-x86_64]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: bytedeco/javacpp-presets/.github/actions/redeploy@actions
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

### November 16, 2024 version 1.5.11
* Fix `Generator` flakiness caused by calls to `Class.getDeclaredMethods()` ([pull #784](https://github.com/bytedeco/javacpp/pull/784))
* Add minimal mappings for `std::chrono` from C++11 ([pull #766](https://github.com/bytedeco/javacpp/pull/766))
* Let `Parser` annotate Java constructors with `@Deprecated` when appropriate ([pull #757](https://github.com/bytedeco/javacpp/pull/757))
* Add to `InfoMap.defaults` more names that are reserved in Java, but not in C++ ([pull #757](https://github.com/bytedeco/javacpp/pull/757))
* Bundle `libomp` from Visual Studio to fix presets using OpenMP on Windows ([pull #755](https://github.com/bytedeco/javacpp/pull/755))
* Fix inconsistencies when using `@Platform(inherit=..., library=...)` together ([pull #747](https://github.com/bytedeco/javacpp/pull/747))
* Fix inconsistencies when using `@Platform(inherit=..., library=...)` together ([issue #747](https://github.com/bytedeco/javacpp/issues/747))
* Let `Parser` support templates with unnamed type parameters ([pull #742](https://github.com/bytedeco/javacpp/pull/742))
* Prevent `Parser` from producing duplicate declarations for basic containers ([pull #741](https://github.com/bytedeco/javacpp/pull/741))

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ We can also have everything downloaded and installed automatically with:
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.10</version>
<version>1.5.11</version>
</dependency>
```

* Gradle (inside the `build.gradle.kts` or `build.gradle` file)
```groovy
dependencies {
implementation("org.bytedeco:javacpp:1.5.10")
implementation("org.bytedeco:javacpp:1.5.11")
}
```

* Leiningen (inside the `project.clj` file)
```clojure
:dependencies [
[org.bytedeco/javacpp "1.5.10"]
[org.bytedeco/javacpp "1.5.11"]
]
```

* sbt (inside the `build.sbt` file)
```scala
libraryDependencies += "org.bytedeco" % "javacpp" % "1.5.10"
libraryDependencies += "org.bytedeco" % "javacpp" % "1.5.11"
```

Another option available to Gradle users is [Gradle JavaCPP](https://github.com/bytedeco/gradle-javacpp), and similarly for Scala users there is [SBT-JavaCPP](https://github.com/bytedeco/sbt-javacpp).
Expand Down
2 changes: 1 addition & 1 deletion platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-platform</artifactId>
<version>1.5.11-SNAPSHOT</version>
<version>1.5.12-SNAPSHOT</version>

<name>JavaCPP Platform</name>
<description>The missing bridge between Java and native C++</description>
Expand Down
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.11-SNAPSHOT</version>
<version>1.5.12-SNAPSHOT</version>

<name>JavaCPP</name>
<description>The missing bridge between Java and native C++</description>
Expand Down Expand Up @@ -272,6 +272,10 @@
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>leave-disabled-to-not-generate-sources-twice-on-release</phase>
</execution>
<execution>
<id>attach-source</id>
<goals>
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ boolean methods(Class<?> cls) {
c = c.getSuperclass();
}
boolean[] callbackAllocators = new boolean[methods.length];
Method[] functionMethods = functionMethods(cls, callbackAllocators);
Method[] functionMethods = functionMethods(cls, methods, callbackAllocators);
boolean firstCallback = true;
for (int i = 0; i < methods.length; i++) {
if (!Loader.checkPlatform(methods[i].getAnnotation(Platform.class), properties)) {
Expand Down Expand Up @@ -3636,11 +3636,10 @@ static String functionClassName(Class<?> cls) {
return name != null ? name.value()[0] : "JavaCPP_" + mangle(cls.getName());
}

static Method[] functionMethods(Class<?> cls, boolean[] callbackAllocators) {
static Method[] functionMethods(Class<?> cls, Method[] methods, boolean[] callbackAllocators) {
if (!FunctionPointer.class.isAssignableFrom(cls)) {
return null;
}
Method[] methods = cls.getDeclaredMethods();
Method[] functionMethods = new Method[3];
for (int i = 0; i < methods.length; i++) {
String methodName = methods[i].getName();
Expand Down Expand Up @@ -4386,7 +4385,7 @@ String[] cppTypeName(Class<?> type, Annotation[] annotations) {
} else if (type.isPrimitive()) {
prefix = type.getName();
} else if (FunctionPointer.class.isAssignableFrom(type)) {
Method[] functionMethods = functionMethods(type, null);
Method[] functionMethods = functionMethods(type, type.getDeclaredMethods(), null);
String[] prefixSuffix = cppFunctionTypeName(functionMethods);
if (prefixSuffix != null) {
return prefixSuffix;
Expand Down

0 comments on commit 67567f8

Please sign in to comment.