Skip to content

Commit

Permalink
Merge pull request #411 from capacitor-community/next
Browse files Browse the repository at this point in the history
feat(): support SPM / update SDK / fix fetchConnectionToken
  • Loading branch information
rdlabo authored Dec 5, 2024
2 parents 76d9be2 + 9086a22 commit 3fe2c3d
Show file tree
Hide file tree
Showing 116 changed files with 5,347 additions and 5,159 deletions.
78 changes: 74 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ jobs:
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-v1-dependencies-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-v1-dependencies-
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1

- name: Build Payment package
run: npm install && npm run build
Expand Down Expand Up @@ -78,6 +76,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/payment
Expand All @@ -97,6 +100,11 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/identity
Expand All @@ -117,9 +125,71 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/terminal
- name: verify
run: npm run verify:android
working-directory: ./packages/terminal

verify-payment-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/payment
- name: verify
run: npm run verify:ios
working-directory: ./packages/payment

verify-identity-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/identity
- name: verify
run: npm run verify:ios
working-directory: ./packages/identity

verify-terminal-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Use cached node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ steps.setup_node.outputs.node-version }}-npm-${{ hashFiles('**/package-lock.json') }}-v1
- name: npm install
run: npm install
working-directory: ./packages/terminal
- name: verify
run: npm run verify:ios
working-directory: ./packages/terminal
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ To use the latest Stripe Android, you need to version these up. To use the lates
+ identityVersion = '20.39.+'

// If you use @capacitor-community/stripe-terminal:
+ stripeterminalCoreVersion = '3.5.0'
+ stripeterminalLocalmobileVersion = '3.5.0'
+ stripeterminalCoreVersion = '4.0.0'
+ stripeterminalTapToPayVersion = '4.0.0'
}
```

Expand Down
13 changes: 13 additions & 0 deletions demo/angular/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

android {
namespace "io.ionic.starter"
Expand Down Expand Up @@ -32,6 +34,7 @@ repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
maven { url 'https://jitpack.io' }
}

dependencies {
Expand All @@ -44,6 +47,16 @@ dependencies {
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
implementation "androidx.core:core-ktx:1.6.0"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

apply from: 'capacitor.build.gradle'
Expand Down
2 changes: 2 additions & 0 deletions demo/angular/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.8.10'

repositories {
google()
Expand All @@ -9,6 +10,7 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.google.gms:google-services:4.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
1 change: 1 addition & 0 deletions demo/angular/android/variables.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ext {
androidxJunitVersion = '1.1.5'
androidxEspressoCoreVersion = '3.5.1'
cordovaAndroidVersion = '10.1.1'
kotlin_version= '1.8.10'

// If you use @capacitor-community/stripe:
// stripeAndroidVersion = '20.39.+'
Expand Down
6 changes: 5 additions & 1 deletion demo/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
"outputHashing": "all",
"optimization": false,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"development": {
"optimization": false,
Expand Down
18 changes: 8 additions & 10 deletions demo/angular/ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
50B271D01FEDC1A000F3C39B /* public */ = {isa = PBXFileReference; lastKnownFileType = folder; path = public; sourceTree = "<group>"; };
AF277DCFFFF123FFC6DF26C7 /* Pods_App.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_App.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.release.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.release.xcconfig"; sourceTree = "<group>"; };
DBAE04F026DA1E5500E76C93 /* App.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = App.entitlements; sourceTree = "<group>"; };
FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-App.debug.xcconfig"; path = "Pods/Target Support Files/Pods-App/Pods-App.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

Expand Down Expand Up @@ -74,7 +73,6 @@
504EC3061FED79650016851F /* App */ = {
isa = PBXGroup;
children = (
DBAE04F026DA1E5500E76C93 /* App.entitlements */,
50379B222058CBB4000EE86E /* capacitor.config.json */,
504EC3071FED79650016851F /* AppDelegate.swift */,
504EC30B1FED79650016851F /* Main.storyboard */,
Expand Down Expand Up @@ -143,6 +141,8 @@
Base,
);
mainGroup = 504EC2FB1FED79650016851F;
packageReferences = (
);
productRefGroup = 504EC3051FED79650016851F /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -347,17 +347,16 @@
baseConfigurationReference = FC68EB0AF532CFC21C3344DD /* Pods-App.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = P7E2DJ2G49;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.stripe;
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -369,16 +368,15 @@
baseConfigurationReference = AF51FD2D460BCFE21FA515B2 /* Pods-App.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = P7E2DJ2G49;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.stripe;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = io.ionic.starter;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down

This file was deleted.

10 changes: 0 additions & 10 deletions demo/angular/ios/App/App/App.entitlements

This file was deleted.

6 changes: 3 additions & 3 deletions demo/angular/ios/App/App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>capacitor-stripe</string>
<string>capacitor-stripe</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
Expand All @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
Expand Down
Loading

0 comments on commit 3fe2c3d

Please sign in to comment.