Skip to content

Commit

Permalink
gha path fixes, more android build fun
Browse files Browse the repository at this point in the history
  • Loading branch information
boorad committed Aug 14, 2024
1 parent d88b432 commit 3755178
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 339 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ on:
- main
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'packages/react-native-quick-crypto/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'bun.lockb'
- 'example/bun.lockb'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'packages/react-native-quick-crypto/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- 'example/android/**'
- 'yarn.lock'
- 'example/yarn.lock'
- 'bun.lockb'
- 'example/bun.lockb'

jobs:
build_android_example:
Expand All @@ -29,8 +33,6 @@ jobs:
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: oven-sh/setup-bun@v2
with:
Expand All @@ -48,6 +50,8 @@ jobs:
with:
accept-android-sdk-licenses: true
log-accepted-android-sdk-licenses: false
# this cmdline tools version barked the least in GHA runners
# hopefully we can remove it in the future
cmdline-tools-version: 9477386

- name: Bootstrap JS
Expand All @@ -64,8 +68,5 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Run Gradle Build for android/
run: cd packages/react-native-quick-crypto/android && ./gradlew assembleDebug && cd ../..

- name: Run Gradle Build for example/android/
- name: Run Gradle Build for example app
run: cd example/android && ./gradlew assembleDebug --build-cache && cd ../..
8 changes: 6 additions & 2 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ on:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'packages/react-native-quick-crypto/ios/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/ios/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- '*.podspec'
- 'example/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- 'packages/react-native-quick-crypto/ios/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/ios/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- '*.podspec'
- 'example/ios/**'

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
with:
accept-android-sdk-licenses: true
log-accepted-android-sdk-licenses: false
# this cmdline tools version barked the least in GHA runners
# hopefully we can remove it in the future
cmdline-tools-version: 9477386

- name: Bootstrap JS
Expand Down
30 changes: 16 additions & 14 deletions .github/workflows/validate-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,29 @@ on:
- main
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '*.json'
- '*.js'
- '*.lock'
- 'bun.lockb'
- 'packages/react-native-quick-crypto/src/**'
- 'packages/react-native-quick-crypto/*.json'
- 'packages/react-native-quick-crypto/*.*s'
- 'packages/react-native-quick-crypto/bun.lockb'
- 'example/src/**'
- 'example/*.json'
- 'example/*.js'
- 'example/*.lock'
- 'example/*.tsx'
- 'example/*.*s'
- 'example/*.*sx'
- 'example/bun.lockb'
pull_request:
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '*.json'
- '*.js'
- '*.lock'
- 'bun.lockb'
- 'packages/react-native-quick-crypto/src/**'
- 'packages/react-native-quick-crypto/*.json'
- 'packages/react-native-quick-crypto/*.*s'
- 'packages/react-native-quick-crypto/bun.lockb'
- 'example/src/**'
- 'example/*.json'
- 'example/*.js'
- 'example/*.lock'
- 'example/*.tsx'
- 'example/*.*s'
- 'example/*.*sx'
- 'example/bun.lockb'

jobs:
compile_js:
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 28
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.22"
kotlinVersion = "1.9.25"
}
repositories {
google()
Expand Down
10 changes: 7 additions & 3 deletions packages/react-native-quick-crypto/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
buildscript {
ext.kotlinVersion = '1.9.25'

repositories {
google()
mavenCentral()
}

dependencies {
classpath "com.android.tools.build:gradle:7.2.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25"
classpath "com.android.tools.build:gradle:8.2.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}"
}
}

Expand Down Expand Up @@ -99,7 +101,9 @@ repositories {


dependencies {
implementation "com.facebook.react:react-native"
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"

implementation project(":react-native-nitro-modules")
implementation "com.android.ndk.thirdparty:openssl:1.1.1q-beta-1"
}
Expand Down
5 changes: 2 additions & 3 deletions packages/react-native-quick-crypto/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
QuickCrypto_kotlinVersion=1.9.25
QuickCrypto_compileSdkVersion=34
QuickCrypto_targetSdkVersion=34
QuickCrypto_minSdkVersion=29
QuickCrypto_ndkversion=21.4.7075529
QuickCrypto_minSdkVersion=23
QuickCrypto_ndkVersion=21.4.7075529

android.useAndroidX=true
Binary file not shown.

This file was deleted.

183 changes: 0 additions & 183 deletions packages/react-native-quick-crypto/android/gradlew

This file was deleted.

Loading

0 comments on commit 3755178

Please sign in to comment.