expo-application 4.0.1 → 4.2.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,22 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 4.2.0 — 2022-07-07
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 4.1.0 — 2022-04-18
18
+
19
+ ### ⚠️ Notices
20
+
21
+ - 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))
22
+
23
+ ## 4.0.2 - 2022-02-01
24
+
25
+ ### 🐛 Bug fixes
26
+
27
+ - 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))
28
+
13
29
  ## 4.0.1 — 2021-11-17
14
30
 
15
31
  _This version does not introduce any user-facing changes._
package/README.md CHANGED
@@ -4,11 +4,11 @@ Gets native application information such as its ID, app name, and build version
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/application.md)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/application.md)
8
8
 
9
9
  # Installation in managed Expo projects
10
10
 
11
- For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#https://docs.expo.io/versions/latest/sdk/application/).
11
+ For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](#https://docs.expo.dev/versions/latest/sdk/application/).
12
12
 
13
13
  # Installation in bare React Native projects
14
14
 
@@ -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 = '4.0.1'
6
+ version = '4.2.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 12
60
- versionName '4.0.1'
77
+ versionName '4.2.0'
61
78
  }
62
79
  lintOptions {
63
80
  abortOnError false
@@ -68,10 +85,10 @@ dependencies {
68
85
  implementation project(':expo-modules-core')
69
86
 
70
87
  implementation 'com.android.installreferrer:installreferrer:1.0'
71
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
88
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
72
89
 
73
- if (project.findProject(':unimodules-test-core')) {
74
- testImplementation project(':unimodules-test-core')
90
+ if (project.findProject(':expo-modules-test-core')) {
91
+ testImplementation project(':expo-modules-test-core')
75
92
  }
76
93
  testImplementation "org.robolectric:robolectric:4.5.1"
77
94
  testImplementation 'junit:junit:4.12'
@@ -129,3 +129,4 @@ export declare function getInstallationTimeAsync(): Promise<Date>;
129
129
  * @platform android
130
130
  */
131
131
  export declare function getLastUpdateTimeAsync(): Promise<Date>;
132
+ //# sourceMappingURL=Application.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Application.d.ts","sourceRoot":"","sources":["../src/Application.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,GAAG,IAExC,CAAC;AAGT;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,GAAG,IAElC,CAAC;AAGT;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,GAAG,IAE/B,CAAC;AAGT;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,GAAG,IAE7B,CAAC;AAGT;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS,EAAE,MAAM,GAAG,IAAiE,CAAC;AAGnG;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,IAAI,OAAO,CAAC,MAAM,CAAC,CAK/D;AAGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAKrE;AAGD,oBAAY,sBAAsB;IAChC,OAAO,IAAI;IACX,SAAS,IAAI;IACb,UAAU,IAAI;IACd,WAAW,IAAI;IACf,MAAM,IAAI;IACV,SAAS,IAAI;CACd;AAGD;;;;GAIG;AACH,wBAAsB,iCAAiC,IAAI,OAAO,CAAC,sBAAsB,CAAC,CAKzF;AAGD;;;;;;GAMG;AACH,wBAAsB,6CAA6C,IAAI,OAAO,CAAC,MAAM,CAAC,CAKrF;AAGD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM9D;AAGD;;;;;;;;;;;GAWG;AACH,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAM5D"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=Application.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Application.types.d.ts","sourceRoot":"","sources":["../src/Application.types.ts"],"names":[],"mappings":""}
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExpoApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoApplication.d.ts","sourceRoot":"","sources":["../src/ExpoApplication.ts"],"names":[],"mappings":";AACA,wBAAkD"}
@@ -8,3 +8,4 @@ declare const _default: {
8
8
  getInstallationTimeAsync(): Promise<null>;
9
9
  };
10
10
  export default _default;
11
+ //# sourceMappingURL=ExpoApplication.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpoApplication.web.d.ts","sourceRoot":"","sources":["../src/ExpoApplication.web.ts"],"names":[],"mappings":";;;;;;;gCAmBoC,QAAQ,IAAI,CAAC;;AAnBjD,wBAsBE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-application",
3
- "version": "4.0.1",
3
+ "version": "4.2.0",
4
4
  "description": "A universal module that gets native application information such as its ID, app name, and build version at runtime",
5
5
  "main": "build/Application.js",
6
6
  "types": "build/Application.d.ts",
@@ -36,5 +36,5 @@
36
36
  "peerDependencies": {
37
37
  "expo": "*"
38
38
  },
39
- "gitHead": "9faa58818454ba59dbff95077b9025a1c1cbd9fd"
39
+ "gitHead": "093d340c3fd67ff4375af3a471c7d044aee893c9"
40
40
  }
package/tsconfig.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "outDir": "./build"
6
6
  },
7
7
  "include": ["./src"],
8
- "exclude": ["**/__mocks__/*", "**/__tests__/*"]
8
+ "exclude": ["**/__mocks__/*", "**/__tests__/*", "**/__stories__/*"]
9
9
  }