diff --git a/ios/RNTextSize.podspec b/RNTextSize.podspec similarity index 89% rename from ios/RNTextSize.podspec rename to RNTextSize.podspec index 281e201..da929db 100644 --- a/ios/RNTextSize.podspec +++ b/RNTextSize.podspec @@ -1,5 +1,5 @@ require 'json' -package = JSON.parse(File.read('../package.json')) +package = JSON.parse(File.read('./package.json')) Pod::Spec.new do |s| s.name = 'RNTextSize' @@ -14,7 +14,7 @@ Pod::Spec.new do |s| s.author = package['author'] s.platform = :ios, '9.0' s.source = { :git => package['repository'], :tag => "v#{s.version}" } - s.source_files = '*.{h,m}' + s.source_files = 'ios/*.{h,m}' s.requires_arc = true s.dependency 'React' diff --git a/android/build.gradle b/android/build.gradle index 2617bd7..27889c3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,18 +8,22 @@ def safeExtGet(prop, fallback) { return rootProject.ext.hasProperty(prop) ? rootProject.ext.get(prop) : fallback } -def _buildToolsVersion = safeExtGet('buildToolsVersion', '28.0.3') -def _compileSdkVersion = safeExtGet('compileSdkVersion', 28) -def _targetSdkVersion = safeExtGet('targetSdkVersion', 28) +def _compileSdkVersion = safeExtGet('compileSdkVersion', 30) +def _targetSdkVersion = safeExtGet('targetSdkVersion', 30) def _minSdkVersion = safeExtGet('minSdkVersion', 16) buildscript { - repositories { - google() - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:3.4.1' + // 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 { + google() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.0.1") + } } } @@ -27,7 +31,6 @@ apply plugin: 'com.android.library' android { compileSdkVersion _compileSdkVersion - buildToolsVersion _buildToolsVersion defaultConfig { minSdkVersion _minSdkVersion @@ -43,7 +46,6 @@ android { repositories { mavenLocal() google() - jcenter() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" @@ -51,7 +53,7 @@ repositories { } dependencies { - compileOnly 'com.facebook.react:react-native:+' + implementation 'com.facebook.react:react-native:+' } task customClean(type: Delete) { diff --git a/package.json b/package.json index e9dc76c..80e469c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-text-size", - "version": "4.0.0-rc.1", + "version": "4.0.0-rc.2", "description": "Measure text accurately before laying it out and get font information from your App", "main": "index.js", "keywords": [