-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(ios): Cavy: podspec location + AGP8 compat; ios no channels
without the Cavy patch auto-linking fails as it requires the podspec at module root in modern react-native, and it has apparently been failing long enough that a bit of android-specific testing crept out of the android-specific testing area this also prepares the cavy native reporter for AGP8
- Loading branch information
Showing
3 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
tests_react_native/patches/cavy-native-reporter+0.1.3.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
diff --git a/node_modules/cavy-native-reporter/ios/CavyNativeReporter.podspec b/node_modules/cavy-native-reporter/CavyNativeReporter.podspec | ||
similarity index 81% | ||
rename from node_modules/cavy-native-reporter/ios/CavyNativeReporter.podspec | ||
rename to node_modules/cavy-native-reporter/CavyNativeReporter.podspec | ||
index dd101c9..1019194 100644 | ||
--- a/node_modules/cavy-native-reporter/ios/CavyNativeReporter.podspec | ||
+++ b/node_modules/cavy-native-reporter/CavyNativeReporter.podspec | ||
@@ -1,4 +1,4 @@ | ||
-package = JSON.parse(File.read(File.join(__dir__, (File.join('..', 'package.json'))))) | ||
+package = JSON.parse(File.read(File.join(__dir__, 'package.json'))) | ||
|
||
Pod::Spec.new do |s| | ||
s.name = "CavyNativeReporter" | ||
@@ -10,7 +10,7 @@ Pod::Spec.new do |s| | ||
s.author = { "author" => "[email protected]" } | ||
s.platform = :ios, "7.0" | ||
s.source = { :git => "https://github.com/pixielabs/cavy-native-reporter.git", :tag => "v#{s.version}" } | ||
- s.source_files = "*.{h,m}" | ||
+ s.source_files = "ios/*.{h,m}" | ||
s.requires_arc = true | ||
s.dependency "React-Core" | ||
end | ||
diff --git a/node_modules/cavy-native-reporter/android/build.gradle b/node_modules/cavy-native-reporter/android/build.gradle | ||
index 6c17279..b862d6b 100644 | ||
--- a/node_modules/cavy-native-reporter/android/build.gradle | ||
+++ b/node_modules/cavy-native-reporter/android/build.gradle | ||
@@ -1,17 +1,27 @@ | ||
|
||
buildscript { | ||
+ // The Android Gradle plugin is only required when opening the android folder stand-alone. | ||
+ // This avoids unnecessary downloads and potential conflicts when the library is included as a | ||
+ // module dependency in an application project. | ||
+ if (project == rootProject) { | ||
repositories { | ||
jcenter() | ||
} | ||
- | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.3.1' | ||
} | ||
+ } | ||
} | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
+ def agpVersion = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION | ||
+ // Check AGP version for backward compatibility w/react-native versions still on gradle plugin 6 | ||
+ if (agpVersion.tokenize('.')[0].toInteger() >= 7) { | ||
+ namespace = "com.cavynativereporter" | ||
+ } | ||
+ | ||
compileSdkVersion 28 | ||
buildToolsVersion "28.0.3" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters