Skip to content

Commit

Permalink
Merge pull request #26 from recognizegroup/feature/upgrade-to-capacit…
Browse files Browse the repository at this point in the history
…or-5

Upgrade library to support Capacitor 5
  • Loading branch information
wslaghekke authored Aug 31, 2023
2 parents 5dd50aa + c7003b4 commit 16bce5a
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 87 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
publish:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
- run: npm ci
- run: npm set "//registry.npmjs.org/:_authToken" ${{ secrets.NPM_TOKEN }}
- run: npm version --commit-hooks=false --allow-same-version=true ${GITHUB_REF##*/}
Expand Down
38 changes: 16 additions & 22 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,18 @@ jobs:
lint:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
- run: npm install
- run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- run: npm run test
- run: npm run lint

verify-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm install
Expand All @@ -44,19 +33,24 @@ jobs:
verify-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
- name: Setup jdk
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- run: npm install
- run: npm run verify:android

verify-ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
- run: npm install
- run: npm run verify:ios
27 changes: 14 additions & 13 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
}

buildscript {
Expand All @@ -11,17 +11,18 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.android.tools.build:gradle:8.0.0'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
namespace "nl.recognize.msauthplugin.capacitorpluginmsauth"
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -37,8 +38,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

packagingOptions {
Expand All @@ -63,11 +64,11 @@ dependencies {
implementation project(':capacitor-android')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "com.microsoft.identity.client:msal:2.2.0"
testImplementation "org.json:json:20210307"
testImplementation "org.mockito:mockito-inline:3.6.28"
testImplementation "org.mockito:mockito-junit-jupiter:3.12.4"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.8.0"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.8.0"
testImplementation "org.json:json:20230227"
testImplementation "org.mockito:mockito-inline:5.2.0"
testImplementation "org.mockito:mockito-junit-jupiter:5.3.1"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.9.3"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.9.3"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.8.0"
Expand Down
2 changes: 0 additions & 2 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
Binary file modified android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 2 additions & 5 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="nl.recognize.msauthplugin.capacitorpluginmsauth">
</manifest>

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>
10 changes: 5 additions & 5 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PODS:
- Capacitor (4.3.0):
- Capacitor (5.2.2):
- CapacitorCordova
- CapacitorCordova (4.3.0)
- CapacitorCordova (5.2.2)
- MSAL (1.1.19):
- MSAL/app-lib (= 1.1.19)
- MSAL/app-lib (1.1.19)
Expand All @@ -22,10 +22,10 @@ EXTERNAL SOURCES:
:path: "../node_modules/@capacitor/ios"

SPEC CHECKSUMS:
Capacitor: 5534f805df231c76164e1d63119bff7b4eac6cd5
CapacitorCordova: 19a82a3b91fbeb9bdd049729551edc3cd7e5e648
Capacitor: 070b18988e0f566728ae9a5eb3a7a974595f1626
CapacitorCordova: 3773395d5331add072300ff6041ca2cf7b93cb0b
MSAL: 0a4993a743aa45147c78c698e0412d00cb005c1a

PODFILE CHECKSUM: f6274e5f60bf7be2dab2cca23d5c22f5d9f33c9e

COCOAPODS: 1.11.2
COCOAPODS: 1.12.1
68 changes: 37 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@recognizebv/capacitor-plugin-msauth",
"version": "2.0.0",
"version": "5.0.0",
"description": "This plugin enables MSAL support for Capacitor.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -48,9 +48,9 @@
"precommit": "npm run fmt && npm run lint && npm run build"
},
"devDependencies": {
"@capacitor/android": "^4.0.0",
"@capacitor/core": "^4.0.0",
"@capacitor/ios": "^4.0.0",
"@capacitor/android": "^5.2.2",
"@capacitor/core": "^5.2.2",
"@capacitor/ios": "^5.2.2",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^2.0.0",
"@ionic/swiftlint-config": "^1.1.2",
Expand All @@ -71,7 +71,7 @@
"typescript": "~4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^4.0.0"
"@capacitor/core": "^5.0.0"
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
Expand Down

0 comments on commit 16bce5a

Please sign in to comment.