Skip to content

Commit

Permalink
Merge pull request #64 from capacitor-community/capv4-support
Browse files Browse the repository at this point in the history
capacitor v4 support
  • Loading branch information
johnborges authored Aug 14, 2022
2 parents a0abef7 + 9ef1d88 commit 1eef3da
Show file tree
Hide file tree
Showing 36 changed files with 809 additions and 748 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use_frameworks!

platform :ios, '12.0'
platform :ios, '13.0'

target 'AppCenterCapacitorShared_Example' do
pod 'AppCenterCapacitorShared', :path => '../'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Pod::Spec.new do |s|
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '12.0'
s.ios.deployment_target = '13.0'
s.dependency 'Capacitor'
s.dependency 'AppCenterCapacitorShared', '~> 2.0'
s.dependency 'AppCenterCapacitorShared', '~> 3.0'
s.dependency 'AppCenter/Analytics', '~> 4.4.0'
s.static_framework = true
s.swift_version = '5.1'
Expand Down
23 changes: 11 additions & 12 deletions appcenter-analytics/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
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'
}

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:7.2.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -36,14 +36,13 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

repositories {
google()
jcenter()
mavenCentral()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions appcenter-analytics/ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -456,7 +456,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -479,7 +479,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
Expand All @@ -504,7 +504,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.getcapacitor.Plugin;
Expand Down
4 changes: 2 additions & 2 deletions appcenter-analytics/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '12.0'
platform :ios, '13.0'

def capacitor_pods
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
Expand All @@ -9,7 +9,7 @@ end

target 'Plugin' do
capacitor_pods
pod 'AppCenterCapacitorShared', '~> 2.0'
pod 'AppCenterCapacitorShared', '~> 3.0'
pod 'AppCenter/Analytics', '~> 4.4.0'
end

Expand Down
20 changes: 10 additions & 10 deletions appcenter-analytics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-community/appcenter-analytics",
"version": "1.1.0",
"version": "3.0.0",
"description": "Capacitor plugin for AppCenter Analytics",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
],
"scripts": {
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
"verify:ios": "cd ios && pod install --repo-update && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
"verify:ios": "cd ios && pod install --repo-update && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
Expand All @@ -47,23 +47,23 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/docgen": "^0.0.17",
"@capacitor/ios": "^3.0.0",
"@capacitor/android": "^4.0.0",
"@capacitor/core": "^4.0.0",
"@capacitor/docgen": "^0.0.18",
"@capacitor/ios": "^4.0.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^7.11.0",
"prettier": "~2.2.0",
"prettier-plugin-java": "~1.0.0",
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.32.0",
"swiftlint": "^1.0.1",
"typescript": "~4.0.3"
"typescript": "~4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^3.0.0"
"@capacitor/core": "^4.0.0"
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
Expand Down
1 change: 1 addition & 0 deletions appcenter-analytics/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"allowUnreachableCode": false,
"declaration": true,
"esModuleInterop": true,
"inlineSources": true,
"lib": ["dom", "es2017"],
"module": "esnext",
"moduleResolution": "node",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Pod::Spec.new do |s|
s.swift_version = '5.1'
s.static_framework = true
s.dependency 'Capacitor'
s.dependency 'AppCenterCapacitorShared', '~> 2.0'
s.dependency 'AppCenterCapacitorShared', '~> 3.0'
s.dependency 'AppCenter/Crashes', '~> 4.4.0'
end
23 changes: 11 additions & 12 deletions appcenter-crashes/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
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'
}

buildscript {
repositories {
google()
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath 'com.android.tools.build:gradle:7.2.1'
}
}

apply plugin: 'com.android.library'

android {
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
defaultConfig {
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -36,14 +36,13 @@ android {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
}

repositories {
google()
jcenter()
mavenCentral()
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
8 changes: 4 additions & 4 deletions appcenter-crashes/ios/Plugin.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -462,7 +462,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -485,7 +485,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)\n$(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = (
Expand Down Expand Up @@ -530,7 +530,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Plugin/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks $(FRAMEWORK_SEARCH_PATHS)";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = (
Expand Down
4 changes: 2 additions & 2 deletions appcenter-crashes/ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '12.0'
platform :ios, '13.0'

def capacitor_pods
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
Expand All @@ -9,7 +9,7 @@ end

target 'Plugin' do
capacitor_pods
pod 'AppCenterCapacitorShared', '~> 2.0'
pod 'AppCenterCapacitorShared', '~> 3.0'
pod 'AppCenter/Crashes', ' ~> 4.4.0'
end

Expand Down
20 changes: 10 additions & 10 deletions appcenter-crashes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@capacitor-community/appcenter-crashes",
"version": "1.0.2",
"version": "3.0.0",
"description": "Capacitor plugin for Microsoft's App Center Crashes",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down Expand Up @@ -34,7 +34,7 @@
],
"scripts": {
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
"verify:ios": "cd ios && pod install --repo-update && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
"verify:ios": "cd ios && pod install --repo-update && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
"verify:android": "cd android && ./gradlew clean build test && cd ..",
"verify:web": "npm run build",
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
Expand All @@ -49,23 +49,23 @@
"prepublishOnly": "npm run build"
},
"devDependencies": {
"@capacitor/android": "^3.0.0",
"@capacitor/core": "^3.0.0",
"@capacitor/docgen": "^0.0.17",
"@capacitor/ios": "^3.0.0",
"@capacitor/android": "^4.0.0",
"@capacitor/core": "^4.0.0",
"@capacitor/docgen": "^0.0.18",
"@capacitor/ios": "^4.0.0",
"@ionic/eslint-config": "^0.3.0",
"@ionic/prettier-config": "^1.0.1",
"@ionic/swiftlint-config": "^1.1.2",
"eslint": "^7.11.0",
"prettier": "~2.2.0",
"prettier-plugin-java": "~1.0.0",
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.2",
"rollup": "^2.32.0",
"swiftlint": "^1.0.1",
"typescript": "~4.0.3"
"typescript": "~4.1.5"
},
"peerDependencies": {
"@capacitor/core": "^3.0.0"
"@capacitor/core": "^4.0.0"
},
"prettier": "@ionic/prettier-config",
"swiftlint": "@ionic/swiftlint-config",
Expand Down
1 change: 1 addition & 0 deletions appcenter-crashes/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"allowUnreachableCode": false,
"declaration": true,
"esModuleInterop": true,
"inlineSources": true,
"lib": ["dom", "es2017"],
"module": "esnext",
"moduleResolution": "node",
Expand Down
4 changes: 2 additions & 2 deletions appcenter/CapacitorCommunityAppcenter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Pod::Spec.new do |s|
s.author = package['author']
s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
s.ios.deployment_target = '12.0'
s.ios.deployment_target = '13.0'
s.dependency 'Capacitor'
s.dependency 'AppCenterCapacitorShared', '~> 2.0'
s.dependency 'AppCenterCapacitorShared', '~> 3.0'
s.static_framework = true
s.swift_version = '5.1'
end
Loading

0 comments on commit 1eef3da

Please sign in to comment.