expo-json-utils 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,28 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 0.3.0 — 2022-04-18
14
+
15
+ ### ⚠️ Notices
16
+
17
+ - On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
18
+
19
+ ## 0.2.1 - 2022-02-01
20
+
21
+ ### 🐛 Bug fixes
22
+
23
+ - Fix `Plugin with id 'maven' not found` build error from Android Gradle 7. ([#16080](https://github.com/expo/expo/pull/16080) by [@kudo](https://github.com/kudo))
24
+
25
+ ## 0.2.0 — 2021-09-28
26
+
27
+ ### 🛠 Breaking changes
28
+
29
+ - Dropped support for iOS 11.0 ([#14383](https://github.com/expo/expo/pull/14383) by [@cruzach](https://github.com/cruzach))
30
+
31
+ ### 🐛 Bug fixes
32
+
33
+ - Fix building errors from use_frameworks! in Podfile. ([#14523](https://github.com/expo/expo/pull/14523) by [@kudo](https://github.com/kudo))
34
+
13
35
  ## 0.1.0 — 2021-09-09
14
36
 
15
37
  Initial version.
@@ -1,63 +1,80 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
- apply plugin: 'maven'
3
+ apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '0.1.0'
6
+ version = '0.3.0'
7
7
 
8
8
  buildscript {
9
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10
+ if (expoModulesCorePlugin.exists()) {
11
+ apply from: expoModulesCorePlugin
12
+ applyKotlinExpoModulesCorePlugin()
13
+ }
14
+
9
15
  // Simple helper that allows the root project to override versions declared by this library.
10
16
  ext.safeExtGet = { prop, fallback ->
11
17
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12
18
  }
13
19
 
20
+ // Ensures backward compatibility
21
+ ext.getKotlinVersion = {
22
+ if (ext.has("kotlinVersion")) {
23
+ ext.kotlinVersion()
24
+ } else {
25
+ ext.safeExtGet("kotlinVersion", "1.6.10")
26
+ }
27
+ }
28
+
14
29
  repositories {
15
30
  mavenCentral()
16
31
  }
17
32
 
18
33
  dependencies {
19
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
34
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
20
35
  }
21
36
  }
22
37
 
23
- // Upload android library to maven with javadoc and android sources
24
- configurations {
25
- deployerJars
26
- }
27
-
28
38
  // Creating sources with comments
29
39
  task androidSourcesJar(type: Jar) {
30
40
  classifier = 'sources'
31
41
  from android.sourceSets.main.java.srcDirs
32
42
  }
33
43
 
34
- // Put the androidSources and javadoc to the artifacts
35
- artifacts {
36
- archives androidSourcesJar
37
- }
38
-
39
- uploadArchives {
40
- repositories {
41
- mavenDeployer {
42
- configuration = configurations.deployerJars
43
- repository(url: mavenLocal().url)
44
+ afterEvaluate {
45
+ publishing {
46
+ publications {
47
+ release(MavenPublication) {
48
+ from components.release
49
+ // Add additional sourcesJar to artifacts
50
+ artifact(androidSourcesJar)
51
+ }
52
+ }
53
+ repositories {
54
+ maven {
55
+ url = mavenLocal().url
56
+ }
44
57
  }
45
58
  }
46
59
  }
47
60
 
48
61
  android {
49
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
50
63
 
51
64
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_1_8
53
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
67
+ }
68
+
69
+ kotlinOptions {
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
54
71
  }
55
72
 
56
73
  defaultConfig {
57
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
58
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
59
76
  versionCode 31
60
- versionName '0.1.0'
77
+ versionName '0.3.0'
61
78
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
62
79
  }
63
80
  lintOptions {
@@ -66,25 +83,22 @@ android {
66
83
  testOptions {
67
84
  unitTests.includeAndroidResources = true
68
85
  }
69
- sourceSets {
70
- androidTest.assets.srcDirs += files("$projectDir/src/androidTest/schemas".toString())
71
- }
72
86
  }
73
87
 
74
88
  dependencies {
75
89
  testImplementation 'junit:junit:4.12'
76
- testImplementation 'androidx.test:core:1.0.0'
90
+ testImplementation 'androidx.test:core:1.4.0'
77
91
  testImplementation 'org.mockito:mockito-core:1.10.19'
78
- testImplementation 'io.mockk:mockk:1.10.6'
92
+ testImplementation 'io.mockk:mockk:1.12.3'
79
93
 
80
94
  androidTestImplementation 'org.amshove.kluent:kluent-android:1.68'
81
- androidTestImplementation 'androidx.test:runner:1.1.0'
82
- androidTestImplementation 'androidx.test:core:1.0.0'
83
- androidTestImplementation 'androidx.test:rules:1.1.0'
95
+ androidTestImplementation 'androidx.test:runner:1.4.0'
96
+ androidTestImplementation 'androidx.test:core:1.4.0'
97
+ androidTestImplementation 'androidx.test:rules:1.4.0'
84
98
  androidTestImplementation 'org.mockito:mockito-android:3.7.7'
85
- androidTestImplementation 'io.mockk:mockk-android:1.10.6'
99
+ androidTestImplementation 'io.mockk:mockk-android:1.12.3'
86
100
 
87
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
101
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
88
102
  }
89
103
  repositories {
90
104
  mavenCentral()
@@ -4,16 +4,16 @@
4
4
 
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
- @interface NSDictionary (EXJSONUtils)
7
+ @interface NSDictionary<__covariant KeyType, __covariant ObjectType> (EXJSONUtils)
8
8
 
9
- - (NSString *)stringForKey:(NSString *)key;
10
- - (nullable NSString *)nullableStringForKey:(NSString *)key;
11
- - (NSNumber *)numberForKey:(NSString *)key;
12
- - (nullable NSNumber *)nullableNumberForKey:(NSString *)key;
13
- - (NSArray *)arrayForKey:(NSString *)key;
14
- - (nullable NSArray *)nullableArrayForKey:(NSString *)key;
15
- - (NSDictionary *)dictionaryForKey:(NSString *)key;
16
- - (nullable NSDictionary *)nullableDictionaryForKey:(NSString *)key;
9
+ - (NSString *)stringForKey:(KeyType)key;
10
+ - (nullable NSString *)nullableStringForKey:(KeyType)key;
11
+ - (NSNumber *)numberForKey:(KeyType)key;
12
+ - (nullable NSNumber *)nullableNumberForKey:(KeyType)key;
13
+ - (NSArray *)arrayForKey:(KeyType)key;
14
+ - (nullable NSArray *)nullableArrayForKey:(KeyType)key;
15
+ - (NSDictionary *)dictionaryForKey:(KeyType)key;
16
+ - (nullable NSDictionary *)nullableDictionaryForKey:(KeyType)key;
17
17
 
18
18
  @end
19
19
 
@@ -19,35 +19,35 @@
19
19
 
20
20
  @implementation NSDictionary (EXJSONUtils)
21
21
 
22
- - (NSString *)stringForKey:(NSString *)key {
22
+ - (NSString *)stringForKey:(id)key {
23
23
  return EXGetNonNullManifestValue(NSString, key);
24
24
  }
25
25
 
26
- - (nullable NSString *)nullableStringForKey:(NSString *)key {
26
+ - (nullable NSString *)nullableStringForKey:(id)key {
27
27
  return EXGetNullableManifestValue(NSString, key);
28
28
  }
29
29
 
30
- - (NSNumber *)numberForKey:(NSString *)key {
30
+ - (NSNumber *)numberForKey:(id)key {
31
31
  return EXGetNonNullManifestValue(NSNumber, key);
32
32
  }
33
33
 
34
- - (nullable NSNumber *)nullableNumberForKey:(NSString *)key {
34
+ - (nullable NSNumber *)nullableNumberForKey:(id)key {
35
35
  return EXGetNullableManifestValue(NSNumber, key);
36
36
  }
37
37
 
38
- - (NSArray *)arrayForKey:(NSString *)key {
38
+ - (NSArray *)arrayForKey:(id)key {
39
39
  return EXGetNonNullManifestValue(NSArray, key);
40
40
  }
41
41
 
42
- - (nullable NSArray *)nullableArrayForKey:(NSString *)key {
42
+ - (nullable NSArray *)nullableArrayForKey:(id)key {
43
43
  return EXGetNullableManifestValue(NSArray, key);
44
44
  }
45
45
 
46
- - (NSDictionary *)dictionaryForKey:(NSString *)key {
46
+ - (NSDictionary *)dictionaryForKey:(id)key {
47
47
  return EXGetNonNullManifestValue(NSDictionary, key);
48
48
  }
49
49
 
50
- - (nullable NSDictionary *)nullableDictionaryForKey:(NSString *)key {
50
+ - (nullable NSDictionary *)nullableDictionaryForKey:(id)key {
51
51
  return EXGetNullableManifestValue(NSDictionary, key);
52
52
  }
53
53
 
@@ -10,8 +10,9 @@ Pod::Spec.new do |s|
10
10
  s.license = package['license']
11
11
  s.author = package['author']
12
12
  s.homepage = package['homepage']
13
- s.platform = :ios, '11.0'
13
+ s.platform = :ios, '12.0'
14
14
  s.source = { git: 'https://github.com/expo/expo.git' }
15
+ s.static_framework = true
15
16
 
16
17
  s.pod_target_xcconfig = {
17
18
  'GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS' => 'YES',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-json-utils",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Utilities for reading NSDictionaries (iOS) and JSONObjects (Android).",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -19,5 +19,5 @@
19
19
  "author": "650 Industries, Inc.",
20
20
  "license": "MIT",
21
21
  "homepage": "https://docs.expo.dev/versions/latest/sdk/module-template",
22
- "gitHead": "eb3dbfb63974cfba9ba86c4f7c96ab2e02c5738f"
22
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
23
23
  }