expo-module-template 10.3.0 → 10.4.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.
@@ -1,66 +1,79 @@
1
1
  apply plugin: 'com.android.library'
2
2
  apply plugin: 'kotlin-android'
3
3
  apply plugin: 'kotlin-android-extensions'
4
- apply plugin: 'maven'
4
+ apply plugin: 'maven-publish'
5
5
 
6
6
  group = '<%- project.package %>'
7
7
  version = '<%- project.version %>'
8
8
 
9
9
  buildscript {
10
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
11
+ if (expoModulesCorePlugin.exists()) {
12
+ apply from: expoModulesCorePlugin
13
+ applyKotlinExpoModulesCorePlugin()
14
+ }
15
+
10
16
  // Simple helper that allows the root project to override versions declared by this library.
11
17
  ext.safeExtGet = { prop, fallback ->
12
18
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
13
19
  }
14
20
 
21
+ // Ensures backward compatibility
22
+ ext.getKotlinVersion = {
23
+ if (ext.has("kotlinVersion")) {
24
+ ext.kotlinVersion()
25
+ } else {
26
+ ext.safeExtGet("kotlinVersion", "1.6.10")
27
+ }
28
+ }
29
+
15
30
  repositories {
16
31
  mavenCentral()
17
32
  }
18
33
 
19
34
  dependencies {
20
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
35
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
21
36
  }
22
37
  }
23
38
 
24
- // Upload android library to maven with javadoc and android sources
25
- configurations {
26
- deployerJars
27
- }
28
-
29
39
  // Creating sources with comments
30
40
  task androidSourcesJar(type: Jar) {
31
41
  classifier = 'sources'
32
42
  from android.sourceSets.main.java.srcDirs
33
43
  }
34
44
 
35
- // Put the androidSources and javadoc to the artifacts
36
- artifacts {
37
- archives androidSourcesJar
38
- }
39
-
40
- uploadArchives {
41
- repositories {
42
- mavenDeployer {
43
- configuration = configurations.deployerJars
44
- repository(url: mavenLocal().url)
45
+ afterEvaluate {
46
+ publishing {
47
+ publications {
48
+ release(MavenPublication) {
49
+ from components.release
50
+ // Add additional sourcesJar to artifacts
51
+ artifact(androidSourcesJar)
52
+ }
53
+ }
54
+ repositories {
55
+ maven {
56
+ url = mavenLocal().url
57
+ }
45
58
  }
46
59
  }
47
60
  }
48
61
 
49
62
  android {
50
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
63
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
51
64
 
52
65
  compileOptions {
53
- sourceCompatibility JavaVersion.VERSION_1_8
54
- targetCompatibility JavaVersion.VERSION_1_8
66
+ sourceCompatibility JavaVersion.VERSION_11
67
+ targetCompatibility JavaVersion.VERSION_11
55
68
  }
56
-
69
+
57
70
  kotlinOptions {
58
- jvmTarget = JavaVersion.VERSION_1_8
71
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
59
72
  }
60
73
 
61
74
  defaultConfig {
62
75
  minSdkVersion safeExtGet("minSdkVersion", 21)
63
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
76
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
64
77
  versionCode 1
65
78
  versionName "<%- project.version %>"
66
79
  }
@@ -75,5 +88,5 @@ repositories {
75
88
 
76
89
  dependencies {
77
90
  implementation project(':expo-modules-core')
78
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
91
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
79
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-module-template",
3
- "version": "10.3.0",
3
+ "version": "10.4.0",
4
4
  "description": "ExpoModuleTemplate standalone module",
5
5
  "main": "build/ModuleTemplate.js",
6
6
  "types": "build/ModuleTemplate.d.ts",
@@ -28,5 +28,5 @@
28
28
  "peerDependencies": {
29
29
  "expo": "*"
30
30
  },
31
- "gitHead": "12f4884904f6a8788964b79a46fa0acbf80917a8"
31
+ "gitHead": "22dce752354bb429c84851bc4389abe47a766b1f"
32
32
  }