Skip to content

Commit

Permalink
add android build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
3ddelano committed Apr 19, 2024
1 parent 41fcf94 commit b2b7c74
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 19 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,20 @@ jobs:
dev_build: no
platform: windows
arch: x86_64

- identifier: android-arm64-debug
name: 🤖 Android arm64 Debug
runner: ubuntu-20.04
target: template_debug
dev_build: yes
platform: android
arch: arm64
- identifier: android-arm64-release
name: 🤖 Android arm64 Release
runner: ubuntu-20.04
target: template_release
dev_build: no
platform: android
arch: arm64
steps:
- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -86,7 +99,7 @@ jobs:
token: "${{secrets.EOS_SDK_MIRROR_PAT}}"
repository: 3ddelano/eos-sdk-mirror
path: thirdparty/eos-sdk
ref: "877da7fd24b7b9580d7a54df49863c2eb58d28b0"
ref: "6454f08fa83748bb568da7e056d20af5c2021f32"

- name: (Windows) Install mingw64
if: ${{ matrix.platform == 'windows' }}
Expand All @@ -99,6 +112,13 @@ jobs:
sudo apt-get update -qq
sudo apt-get install -qqq build-essential pkg-config
- name: (Android) Install dependencies
if: ${{ matrix.platform == 'android' }}
uses: nttld/setup-ndk@v1
with:
ndk-version: r23c
link-to-sdk: true

- name: Setup build cache
uses: actions/cache@v3
with:
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ Follow the instructions in [Running the service for local development](https://d
implementation libraries.androidxFragment
// EOS SDK dependencies
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.security:security-crypto:1.0.0'
implementation 'androidx.browser:browser:1.0.0'
implementation files('../../../thirdparty/eos-sdk/SDK/Bin/Android/static-stdc++/aar/eos-sdk.aar')
implementation 'androidx.browser:browser:1.4.0'
implementation files('../../../thirdparty/eos-sdk/SDK/Bin/Android/static-stdc++/aar/eossdk-StaticSTDC-release.aar')

...other code
```
Expand Down Expand Up @@ -298,7 +298,7 @@ Follow the instructions in [Running the service for local development](https://d

Before
```
minSdk : 22,
minSdk : 21,
```
After
```
Expand All @@ -321,10 +321,11 @@ Follow the instructions in [Running the service for local development](https://d
@Override
public void onCreate(Bundle savedInstanceState) {
EOSSDK.init(getApplicationContext()); // added

EOSSDK.init(getActivity()); // added
setTheme(R.style.GodotAppMainTheme);
super.onCreate(savedInstanceState);

}
}

Expand All @@ -334,7 +335,7 @@ Follow the instructions in [Running the service for local development](https://d

8. In the `Gradle Build` section, enable `Use Gradle Build`. In the `Architectures` section enable `arm64-v8a`. In the `Permissions` section ensure that `ACESSS_NETWORK_STATE`, `ACCESS_WIFI_STATE` and `INTERNET` are enabled. These permissions are needed for the EOS SDK to work. Fill in the other details such as package name, etc as needed.

9. You can now export the Android APK by clicking the Export Project button.
9. You can now export the Android APK by clicking the `Export Project` button.


## Current Project Status
Expand Down
2 changes: 1 addition & 1 deletion sample/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func _ready() -> void:
init_res = EOS.Platform.PlatformInterface.initialize(init_opts)
init_retry_count -= 1
await get_tree().create_timer(0.2).timeout

if not EOS.is_success(init_res):
print("Failed to initialize EOS SDK: ", EOS.result_str(init_res))
return
Expand Down
16 changes: 8 additions & 8 deletions sample/components/StyledPopupWindow/StyledPopupWindowTheme.tres

Large diffs are not rendered by default.

0 comments on commit b2b7c74

Please sign in to comment.