Skip to content

Commit 16edec6

Browse files
committed
Update Android configuration and dependencies; refine Kotlin integration and improve CI workflow
1 parent 8219062 commit 16edec6

10 files changed

Lines changed: 293 additions & 350 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -107,53 +107,4 @@ jobs:
107107
env:
108108
JAVA_OPTS: "-XX:MaxHeapSize=6g"
109109
run: |
110-
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
111-
112-
build-ios:
113-
runs-on: macos-latest
114-
env:
115-
XCODE_VERSION: 16.2
116-
TURBO_CACHE_DIR: .turbo/ios
117-
steps:
118-
- name: Checkout
119-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
120-
121-
- name: Setup
122-
uses: ./.github/actions/setup
123-
124-
- name: Generate nitrogen code
125-
run: yarn nitrogen
126-
127-
- name: Cache turborepo for iOS
128-
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
129-
with:
130-
path: ${{ env.TURBO_CACHE_DIR }}
131-
key: ${{ runner.os }}-turborepo-ios-${{ hashFiles('yarn.lock') }}
132-
restore-keys: |
133-
${{ runner.os }}-turborepo-ios-
134-
135-
- name: Check turborepo cache for iOS
136-
run: |
137-
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:ios').cache.status")
138-
139-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
140-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
141-
fi
142-
143-
- name: Use appropriate Xcode version
144-
if: env.turbo_cache_hit != 1
145-
uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
146-
with:
147-
xcode-version: ${{ env.XCODE_VERSION }}
148-
149-
- name: Install cocoapods
150-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
151-
run: |
152-
cd example
153-
bundle install
154-
bundle exec pod repo update --verbose
155-
bundle exec pod install --project-directory=ios
156-
157-
- name: Build example for iOS
158-
run: |
159-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
110+
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"

README.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,36 @@ const payment = await doPayment({
135135

136136
### Android Configuration
137137

138-
The PlugPag wrapper (`br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.30.51`) is automatically included as a dependency.
138+
The library automatically includes the PlugPag wrapper, but you need to ensure proper repository access:
139+
140+
#### 1. Add PlugPag repository to `android/build.gradle`:
141+
142+
```groovy
143+
allprojects {
144+
repositories {
145+
google()
146+
mavenCentral()
147+
maven {
148+
url 'https://github.com/pagseguro/PlugPagServiceWrapper/raw/master'
149+
}
150+
}
151+
}
152+
```
139153

140-
That's it! No additional setup is required for the wrapper.
154+
#### 2. Ensure Kotlin support in `android/build.gradle`:
155+
156+
```groovy
157+
buildscript {
158+
ext.kotlin_version = '1.9.0'
159+
dependencies {
160+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
161+
}
162+
}
163+
```
164+
165+
#### 3. That's it! 🎉
166+
167+
The PlugPag wrapper (`br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.30.51`) is automatically included as a dependency.
141168

142169
---
143170

@@ -421,12 +448,6 @@ MIT © [Mateus Andrade](https://github.com/mCodex)
421448

422449
---
423450

424-
## 🆘 Support
425-
426-
- 🐛 **Bug Reports**: [GitHub Issues](https://github.com/mCodex/react-native-plugpag-nitro/issues)
427-
- 💬 **Questions**: [GitHub Discussions](https://github.com/mCodex/react-native-plugpag-nitro/discussions)
428-
- 📧 **Email**: mat.andrade@live.com
429-
430451
### PagSeguro Support
431452

432453
- **Development Code**: `403938` (commonly used for testing)

android/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ dependencies {
128128
implementation "com.facebook.react:react-android"
129129
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
130130
implementation project(":react-native-nitro-modules")
131+
131132
implementation "br.com.uol.pagseguro.plugpagservice.wrapper:wrapper:1.30.51"
132133
}
133134

android/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PlugpagNitro_kotlinVersion=2.0.21
1+
PlugpagNitro_kotlinVersion=2.1.20
22
PlugpagNitro_minSdkVersion=24
3-
PlugpagNitro_targetSdkVersion=34
3+
PlugpagNitro_targetSdkVersion=35
44
PlugpagNitro_compileSdkVersion=35
55
PlugpagNitro_ndkVersion=27.1.12297006

0 commit comments

Comments
 (0)