Skip to content

Commit

Permalink
Merge pull request #10 from umjammer/0.8.5
Browse files Browse the repository at this point in the history
0.8.5
  • Loading branch information
umjammer authored Nov 15, 2022
2 parents 63437e7 + a106afc commit cd3b605
Show file tree
Hide file tree
Showing 163 changed files with 13,519 additions and 997 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,37 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
run: mvn -B install --file pom.xml -DskipTest
- name: Build with Maven
run: mvn -B install --file pom.xml

# ℹ️ Command-line programs to run using the OS shell.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
34 changes: 19 additions & 15 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B install --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B install --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml -Dmaven.test.skip=true
env:
GITHUB_TOKEN: ${{ github.token }}
33 changes: 33 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check w/o SNAPSHOT when "bump version"
if: ${{ contains(github.event.head_commit.message, 'bump version') }}
run: grep "<version>" pom.xml | head -1 | grep -v SNAPSHOT

- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: maven

- name: Build with Maven
run: mvn -B install --file pom.xml
63 changes: 54 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,65 @@
[![GitHub Packages](https://github.com/umjammer/rococoa/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/maven-publish.yml)
[![GitHub Packages](https://github.com/umjammer/rococoa/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/umjammer?tab=packages&repo_name=rococoa)
[![Java CI](https://github.com/umjammer/rococoa/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/rococoa/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-8-b07219)

#  Welcome to Rococoa

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

## Installation

* https://github.com/umjammer/rococoa/packages/
* this project uses github packages. add a personal access token to `~/.m2/settings.xml`
* see https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry

## How To

* [Basics](rococoa-core/readme.md#How-To)
* [CIFilter Java2D BufferedImageOp](rococoa-contrib/src/test/java/org/rococoa/cocoa/coreimage/CoreImageTest.java)
* [CoreML](rococoa-contrib/src/test/java/org/rococoa/cocoa/coreml/CoreMLTest.java)
* [iTunes Library](https://github.com/umjammer/vavi-sound-sandbox/tree/master/src/main/java/vavix/rococoa/ituneslibrary)
* [AudioUnit Java MIDI SPI synthesizer](https://github.com/umjammer/vavi-sound-sandbox/tree/master/src/main/java/vavi/sound/midi/rococoa)
* [CoreMidi Java MIDI SPI](https://github.com/umjammer/osxmidi4j)
* [NSSpeechSynthesizer Java Speech API](https://github.com/umjammer/vavi-speech2/tree/master/src/main/java/vavi/speech/rococoa/jsapi2)
* [HEIF Java ImageIO SPI](https://github.com/umjammer/vavi-image-sandbox/tree/master/src/main/java/vavix/imageio/rococoa)
* [MTLibrary](https://github.com/umjammer/vavi-apps-padsynth/tree/main/src/main/java/vavix/rococoa/multitouch)
* [KeyChain Java crypto Keystore SPI](https://github.com/umjammer/vavi-crypto-sandbox/tree/1.0.2/src/main/java/vavix/rococoa/keychain)
* [Vision Detecting Human Body Poses in Images](rococoa-contrib/src/test/java/org/rococoa/cocoa/vision/VisionTest.java)

## Limitation

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

## TODO

* NSUrl tags (wip)
* block (wip)
* http://cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
* http://www.opensource.apple.com/source/libclosure/libclosure-38/BlockImplementation.txt
* ~~CIFilter~~ (done)
* `cglib` is mostly [suspended](https://github.com/cglib/cglib#readme)
* `cglib` recommends [ByteBuddy](https://bytebuddy.net/) that is based on `asm` same as the `cglib`

## References

* https://github.com/ibinti/bugvm
* https://gitlab.com/axet/apple
* https://github.com/cbyrneee/JNApple
* https://github.com/multi-os-engine/moe-mac-core
* https://github.com/dthommes/jcocoa
* https://github.com/allertonm/Couverjure
* https://github.com/shannah/Java-Objective-C-Bridge

----

# Original

## Fair Warning

Rococoa is very much work in progress. Much is subject to change. A lot isn't
Expand All @@ -27,11 +80,3 @@ any other problems.
* [Quicktime](https://github.com/iterate-ch/rococoa/blob/wiki/Quicktime.md)
* [Limitations](https://github.com/iterate-ch/rococoa/blob/wiki/Limitations.md)
* [Help Wanted](https://github.com/iterate-ch/rococoa/blob/wiki/HelpWanted.md)
* [How To](https://github.com/iterate-ch/rococoa/blob/wiki/HowTo.md)

## TODO

* https://github.com/ibinti/bugvm
* http://cocoawithlove.com/2009/10/how-blocks-are-implemented-and.html
* http://www.opensource.apple.com/source/libclosure/libclosure-38/BlockImplementation.txt

30 changes: 20 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.5</version>
<packaging>pom</packaging>
<version>0.8.4</version>

<modules>
<module>rococoa-auto</module>
Expand Down Expand Up @@ -80,12 +80,12 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<jna.version>5.12.1</jna.version>
</properties>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub umjammer Apache Maven Packages</name>
<url>https://maven.pkg.github.com/umjammer/rococoa</url>
</repository>
</distributionManagement>
Expand All @@ -94,8 +94,9 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<version>3.3.0</version>
<executions>
<execution>
<id>copy</id>
Expand Down Expand Up @@ -124,8 +125,9 @@

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -136,27 +138,37 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>-J-Duser.language=en_US</additionalJOption> <!-- ad-hoc -->
</additionalJOptions>
<additionalOptions>
<additionalOption>-Xdoclint:none</additionalOption>
<additionalOption>-Xdoclint:-missing</additionalOption>
</additionalOptions>
<debug>false</debug>
<verbose>false</verbose>
<failOnWarnings>false</failOnWarnings>
<failOnError>false</failOnError>
<additionalparam>-Xdoclint:none -Xdoclint:-missing</additionalparam>
<doclint>none</doclint>
<quiet>true</quiet>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<version>3.2.0</version>
<inherited>true</inherited>
<configuration>
<encoding>UTF-8</encoding>
Expand Down Expand Up @@ -196,7 +208,7 @@
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.9.0</version>
<version>${jna.version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
Expand All @@ -207,7 +219,7 @@
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.8.1</version>
<version>5.9.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -217,7 +229,6 @@
<repositories>
<repository>
<id>github</id>
<name>GitHub umjammer Apache Maven Packages</name>
<url>https://maven.pkg.github.com/umjammer/rococoa-core</url>
</repository>
</repositories>
Expand All @@ -239,5 +250,4 @@
<scope>test</scope>
</dependency>
</dependencies>

</project>
23 changes: 8 additions & 15 deletions rococoa-auto/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-parent</artifactId>
<version>0.8.4</version>
<version>0.8.5</version>
</parent>

<name>Rococoa Autogenerated Cocoa Package</name>
Expand Down Expand Up @@ -46,30 +46,17 @@
<repository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>nativelibs4java</id>
<name>NativeLibs4Java</name>
<url>http://nativelibs4java.sourceforge.net/maven</url>
<url>https://nativelibs4java.sourceforge.net/maven</url>
</pluginRepository>
<pluginRepository>
<id>sonatype-oss-public</id>
<url>https://oss.sonatype.org/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>

Expand All @@ -78,7 +65,9 @@
<groupId>com.nativelibs4java</groupId>
<artifactId>jnaerator-runtime</artifactId>
<version>${jnaerator.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.rococoa</groupId>
<artifactId>rococoa-core</artifactId>
Expand All @@ -88,9 +77,13 @@
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<!--
<aggregate>true</aggregate>
-->
<minmemory>128m</minmemory>
<maxmemory>512</maxmemory>
<breakiterator>true</breakiterator>
Expand Down
Loading

0 comments on commit cd3b605

Please sign in to comment.