Skip to content

Commit 93bfd4e

Browse files
authored
Merge pull request #13 from umjammer/0.8.6
0.8.6
2 parents cd3b605 + 435d3cd commit 93bfd4e

File tree

135 files changed

+3446
-830
lines changed

Some content is hidden

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

135 files changed

+3446
-830
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
analyze:
1919
name: Analyze
20-
runs-on: macos-latest
20+
runs-on: macos-14
2121

2222
strategy:
2323
fail-fast: false
@@ -41,10 +41,10 @@ jobs:
4141
# By default, queries listed here will override any specified in a config file.
4242
# Prefix the list here with "+" to use these queries and those in the config file.
4343
# queries: ./path/to/local/query, your-org/your-repo/queries@main
44-
- name: Set up JDK 8
44+
- name: Set up JDK 17
4545
uses: actions/setup-java@v3
4646
with:
47-
java-version: '8'
47+
java-version: '17'
4848
distribution: 'temurin'
4949
cache: maven
5050
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml

.github/workflows/maven-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ on:
1010
jobs:
1111
build:
1212

13-
runs-on: macos-latest
13+
runs-on: macos-14
1414

1515
steps:
1616
- name: Checkout repository
1717
uses: actions/checkout@v3
1818

19-
- name: Set up JDK 8
19+
- name: Set up JDK 17
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: '8'
22+
java-version: '17'
2323
distribution: 'temurin'
2424
cache: maven
2525
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml

.github/workflows/maven.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will build a Java project with Maven
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
33

4-
name: Java CI with Maven
4+
name: Java CI
55

66
on:
77
push:
@@ -12,7 +12,7 @@ on:
1212
jobs:
1313
build:
1414

15-
runs-on: macos-latest
15+
runs-on: macos-14
1616

1717
steps:
1818
- name: Checkout repository
@@ -22,10 +22,10 @@ jobs:
2222
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
2323
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT
2424

25-
- name: Set up JDK 8
25+
- name: Set up JDK 17
2626
uses: actions/setup-java@v3
2727
with:
28-
java-version: '8'
28+
java-version: '17'
2929
distribution: 'temurin'
3030
cache: maven
3131

.gitignore

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

README.md

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
[![GitHub Packages](https://github.com/umjammer/rococoa/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer?tab=packages&repo_name=rococoa)
22
[![Java CI](https://github.com/umjammer/rococoa/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/maven.yml)
33
[![CodeQL](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml)
4-
![Java](https://img.shields.io/badge/Java-8-b07219)
4+
![Java](https://img.shields.io/badge/Java-17-b07219)
55

66
#  Welcome to Rococoa
77

88
Rococoa is a generic Java binding to the Mac Objective-C object system. It
99
allows the creation and use of Objective-C objects in Java, and the
1010
implementation of Objective-C interfaces in Java.
1111

12+
## ⚠ Caution
13+
14+
* this project will **quit** supporting **intel** chips
15+
* supported macos will be **after Ventura** also
16+
17+
## Limitation
18+
19+
* ~~obj-c class's method call with float argument doesn't work~~ works → new limitation: arguments should be less equal 8
20+
* ~~[the reason](https://github.com/java-native-access/jna/issues/463#issuecomment-1286015013)~~ -> actually https://github.com/java-native-access/jna/issues/1476#issuecomment-1292804072
21+
* https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html
22+
* obj-c block
23+
* methods has **varargs don't** work (works less equal 8?)
24+
1225
## Installation
1326

1427
* https://github.com/umjammer/rococoa/packages/
@@ -29,32 +42,46 @@ implementation of Objective-C interfaces in Java.
2942
* [KeyChain Java crypto Keystore SPI](https://github.com/umjammer/vavi-crypto-sandbox/tree/1.0.2/src/main/java/vavix/rococoa/keychain)
3043
* [Vision Detecting Human Body Poses in Images](rococoa-contrib/src/test/java/org/rococoa/cocoa/vision/VisionTest.java)
3144

32-
## Limitation
33-
34-
* obj-c class's method call with float argument doesn't work
35-
* [the reason](https://github.com/java-native-access/jna/issues/463#issuecomment-1286015013)
36-
* https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html
37-
* block
38-
3945
## TODO
4046

4147
* NSUrl tags (wip)
42-
* block (wip)
48+
* obj-block (wip)
49+
* https://github.com/nativelibs4java/BridJ/
4350
* http://cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
4451
* http://www.opensource.apple.com/source/libclosure/libclosure-38/BlockImplementation.txt
52+
* https://clang.llvm.org/docs/Block-ABI-Apple.html
53+
* https://github.com/ronaldoussoren/pyobjc/blob/77b98382e52818690449111cd2e23cd469b53cf5/pyobjc-core/Modules/objc/block_support.m
54+
* https://docs.rs/block/latest/block/
4555
* ~~CIFilter~~ (done)
46-
* `cglib` is mostly [suspended](https://github.com/cglib/cglib#readme)
47-
* `cglib` recommends [ByteBuddy](https://bytebuddy.net/) that is based on `asm` same as the `cglib`
56+
* CGImage fails around density related
57+
* ~~`cglib` is mostly [suspended](https://github.com/cglib/cglib#readme)~~
58+
* ~~`cglib` recommends [ByteBuddy](https://bytebuddy.net/) that is based on `asm` same as the `cglib`~~ (done)
59+
* cache classes (ByteBuddy)
60+
* ~~clean up logging~~
61+
* native library loading
62+
* https://github.com/scijava/native-lib-loader
63+
* dynamic method creation
64+
* invokedinamic?
65+
* ByteBuddy's method interception???
66+
* CGController
67+
* https://stackoverflow.com/a/65999820
68+
* activate application
69+
* https://developer.apple.com/documentation/appkit/nsrunningapplication?language=objc
70+
* separate same parts of jna-platform (like jna-platform-extended)
71+
* deprecate rococoa-contrib
4872

4973
## References
5074

5175
* https://github.com/ibinti/bugvm
5276
* https://gitlab.com/axet/apple
53-
* https://github.com/cbyrneee/JNApple
5477
* https://github.com/multi-os-engine/moe-mac-core
5578
* https://github.com/dthommes/jcocoa
5679
* https://github.com/allertonm/Couverjure
57-
* https://github.com/shannah/Java-Objective-C-Bridge
80+
* https://github.com/shannah/Java-Objective-C-Bridge (minecraft uses)
81+
* gamepad
82+
* http://eleccelerator.com/wiki/index.php?title=DualShock_4
83+
* https://github.com/born2snipe/gamepad4j/blob/master/gamepad4j-desktop/src/main/c/macos/Gamepad_macosx.c
84+
* port [hidapi](https://github.com/libusb/hidapi) mac part
5885

5986
----
6087

pom.xml

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,24 @@
66

77
<groupId>org.rococoa</groupId>
88
<artifactId>rococoa-parent</artifactId>
9-
<version>0.8.5</version>
9+
<version>0.8.6</version>
1010
<packaging>pom</packaging>
1111

1212
<modules>
13-
<module>rococoa-auto</module>
13+
<!-- module>rococoa-auto</module -->
1414
<module>rococoa-core</module>
1515
<module>rococoa-cocoa</module>
1616
<module>rococoa-contrib</module>
1717
<!-- module>rococoa-functionaltest</module -->
1818
</modules>
1919

2020
<name>Rococoa Parent Project</name>
21-
<url>http://www.rococoa.org</url>
21+
<url>https://github.com/umjammer/rococoa</url>
2222
<scm>
2323
<url>https://github.com/umjammer/rococoa</url>
2424
<connection>scm:git:git@github.com:umjammer/rococoa.git</connection>
2525
<developerConnection>scm:git:git@github.com:umjammer/rococoa.git</developerConnection>
2626
</scm>
27-
2827
<developers>
2928
<developer>
3029
<id>oneeyedmen</id>
@@ -68,7 +67,6 @@
6867
</roles>
6968
</developer>
7069
</developers>
71-
7270
<licenses>
7371
<license>
7472
<name>LGPL 3</name>
@@ -78,9 +76,7 @@
7876
</licenses>
7977

8078
<properties>
81-
<maven.compiler.source>1.8</maven.compiler.source>
82-
<maven.compiler.target>1.8</maven.compiler.target>
83-
<jna.version>5.12.1</jna.version>
79+
<jna.version>5.14.0</jna.version>
8480
</properties>
8581

8682
<distributionManagement>
@@ -93,6 +89,19 @@
9389
<build>
9490
<pluginManagement>
9591
<plugins>
92+
<plugin>
93+
<groupId>org.apache.maven.plugins</groupId>
94+
<artifactId>maven-compiler-plugin</artifactId>
95+
<version>3.11.0</version>
96+
<configuration>
97+
<release>17</release>
98+
<compilerArgs>
99+
<arg>-XDignore.symbol.file</arg> <!-- for com.apple.eawt -->
100+
</compilerArgs>
101+
<!-- https://stackoverflow.com/a/30472473 -->
102+
<fork>true</fork>
103+
</configuration>
104+
</plugin>
96105
<plugin>
97106
<groupId>org.apache.maven.plugins</groupId>
98107
<artifactId>maven-dependency-plugin</artifactId>
@@ -127,7 +136,7 @@
127136
<plugin>
128137
<groupId>org.apache.maven.plugins</groupId>
129138
<artifactId>maven-source-plugin</artifactId>
130-
<version>3.2.1</version>
139+
<version>3.3.0</version>
131140
<executions>
132141
<execution>
133142
<id>attach-sources</id>
@@ -140,7 +149,7 @@
140149
<plugin>
141150
<groupId>org.apache.maven.plugins</groupId>
142151
<artifactId>maven-javadoc-plugin</artifactId>
143-
<version>3.4.0</version>
152+
<version>3.5.0</version>
144153
<executions>
145154
<execution>
146155
<id>attach-javadocs</id>
@@ -168,7 +177,7 @@
168177
<plugin>
169178
<groupId>org.apache.maven.plugins</groupId>
170179
<artifactId>maven-resources-plugin</artifactId>
171-
<version>3.2.0</version>
180+
<version>3.3.1</version>
172181
<inherited>true</inherited>
173182
<configuration>
174183
<encoding>UTF-8</encoding>
@@ -211,15 +220,15 @@
211220
<version>${jna.version}</version>
212221
</dependency>
213222
<dependency>
214-
<groupId>cglib</groupId>
215-
<artifactId>cglib</artifactId>
216-
<version>3.3.0</version>
223+
<groupId>net.bytebuddy</groupId>
224+
<artifactId>byte-buddy</artifactId>
225+
<version>1.14.8</version>
217226
</dependency>
218227

219228
<dependency>
220229
<groupId>org.junit</groupId>
221230
<artifactId>junit-bom</artifactId>
222-
<version>5.9.1</version>
231+
<version>5.10.1</version>
223232
<type>pom</type>
224233
<scope>import</scope>
225234
</dependency>

rococoa-auto/pom.xml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
<parent>
1111
<groupId>org.rococoa</groupId>
1212
<artifactId>rococoa-parent</artifactId>
13-
<version>0.8.5</version>
13+
<version>0.8.6</version>
1414
</parent>
1515

1616
<name>Rococoa Autogenerated Cocoa Package</name>
17-
<url>http://www.rococoa.org</url>
17+
<url>https://github.com/umjammer/rococoa</url>
1818

1919
<properties>
2020
<jnaerator.version>0.12</jnaerator.version>
@@ -66,6 +66,17 @@
6666
<artifactId>jnaerator-runtime</artifactId>
6767
<version>${jnaerator.version}</version>
6868
<scope>provided</scope>
69+
<exclusions>
70+
<exclusion>
71+
<groupId>com.nativelibs4java</groupId>
72+
<artifactId>bridj</artifactId>
73+
</exclusion>
74+
</exclusions>
75+
</dependency>
76+
<dependency>
77+
<groupId>com.nativelibs4java</groupId>
78+
<artifactId>bridj</artifactId>
79+
<version>0.8.0</version>
6980
</dependency>
7081

7182
<dependency>
@@ -79,7 +90,7 @@
7990
<plugin>
8091
<groupId>org.apache.maven.plugins</groupId>
8192
<artifactId>maven-javadoc-plugin</artifactId>
82-
<version>3.4.0</version>
93+
<version>3.5.0</version>
8394
<configuration>
8495
<!--
8596
<aggregate>true</aggregate>

rococoa-auto/readne.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# rococa-auto
2+
3+
## References
4+
5+
* https://jnaerator.sourceforge.net/sites/rococoa-auto/apidocs/

rococoa-cocoa/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
<parent>
1111
<groupId>org.rococoa</groupId>
1212
<artifactId>rococoa-parent</artifactId>
13-
<version>0.8.5</version>
13+
<version>0.8.6</version>
1414
</parent>
1515

1616
<name>Rococoa Cocoa Mappings</name>
17-
<url>http://www.rococoa.org</url>
17+
<url>https://github.com/umjammer/rococoa</url>
1818

1919
<build>
2020
<plugins>
2121
<plugin>
2222
<groupId>org.apache.maven.plugins</groupId>
2323
<artifactId>maven-dependency-plugin</artifactId>
24-
<version>3.3.0</version>
24+
<version>3.6.1</version>
2525
</plugin>
2626
<plugin>
2727
<groupId>org.apache.maven.plugins</groupId>
2828
<artifactId>maven-surefire-plugin</artifactId>
29-
<version>3.0.0-M7</version>
29+
<version>3.2.2</version>
3030
<configuration>
31-
<forkMode>once</forkMode>
31+
<reuseForks>false</reuseForks>
3232
<argLine>
3333
-Djava.util.logging.config.file=${project.build.testOutputDirectory}/logging.properties
3434
</argLine>
@@ -61,7 +61,7 @@
6161
<dependency>
6262
<groupId>com.github.umjammer</groupId>
6363
<artifactId>vavi-commons</artifactId>
64-
<version>1.1.8</version>
64+
<version>1.1.9</version>
6565
<scope>test</scope>
6666
</dependency>
6767
</dependencies>

0 commit comments

Comments
 (0)