Skip to content

Commit

Permalink
ffi: convert to using gomobile
Browse files Browse the repository at this point in the history
Signed-off-by: Sumner Evans <sumner@beeper.com>
  • Loading branch information
sumnerevans committed Jan 2, 2024
1 parent 9cd79ba commit d3b1d94
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 578 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,23 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: '1.21.1'
- name: Install gomobile
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Build imessage.so
run: ./android/imessage.sh
- name: Build AAR
run: ./android/gradlew -p android :library:assembleRelease
- name: Publish to GitHub Packages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./android/gradlew -p android :library:publish
run: gomobile bind -target=android -androidapi 26 -o imessage.aar ./imessage/ffi
# - name: Publish to GitHub Packages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: ./android/gradlew -p android :library:publish
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: aar
path: ./android/library/build/outputs/aar/library-release.aar
path: ffi.aar
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
/.android-ipc-bin
/imgo.h
/imgo.so

/imessage-sources.jar
/imessage.aar
15 changes: 0 additions & 15 deletions android/.gitignore

This file was deleted.

6 changes: 0 additions & 6 deletions android/build.gradle.kts

This file was deleted.

23 changes: 0 additions & 23 deletions android/gradle.properties

This file was deleted.

Binary file removed android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 0 additions & 6 deletions android/gradle/wrapper/gradle-wrapper.properties

This file was deleted.

185 changes: 0 additions & 185 deletions android/gradlew

This file was deleted.

89 changes: 0 additions & 89 deletions android/gradlew.bat

This file was deleted.

Loading

0 comments on commit d3b1d94

Please sign in to comment.