solution-plugin 1.4.0-alpha.2 → 1.4.0-alpha.3

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,67 +1,71 @@
1
1
  buildscript {
2
- ext {
3
- kotlin_version = "1.8.0"
4
- }
5
- repositories {
6
- google()
7
- mavenCentral()
8
- }
9
- dependencies {
10
- classpath "com.android.tools.build:gradle:7.3.1"
11
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12
- }
2
+ ext.getExtOrDefault = {name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SolutionPlugin_' + name]
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ }
13
16
  }
14
17
 
15
- apply plugin: 'com.android.library'
16
- apply plugin: 'kotlin-android'
17
- apply plugin: 'com.facebook.react'
18
18
 
19
- def safeExtGet(prop, fallback) {
20
- rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
19
+ apply plugin: "com.android.library"
20
+ apply plugin: "kotlin-android"
21
+
22
+ apply plugin: "com.facebook.react"
23
+
24
+ def getExtOrIntegerDefault(name) {
25
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SolutionPlugin_" + name]).toInteger()
21
26
  }
22
27
 
23
28
  android {
24
- compileSdkVersion safeExtGet('compileSdkVersion', 33)
25
- namespace "com.solutionplugin"
26
-
27
- defaultConfig {
28
- minSdkVersion 21
29
- targetSdkVersion safeExtGet('targetSdkVersion', 33)
30
- }
29
+ namespace "com.solutionplugin"
31
30
 
32
- buildTypes {
33
- release {
34
- minifyEnabled false
35
- }
36
- }
31
+ compileSdkVersion getExtOrIntegerDefault("compileSdkVersion")
37
32
 
38
- lintOptions {
39
- disable 'GradleCompatible'
40
- }
33
+ defaultConfig {
34
+ minSdkVersion 21
35
+ targetSdkVersion getExtOrIntegerDefault("targetSdkVersion")
36
+ }
41
37
 
42
- compileOptions {
43
- sourceCompatibility JavaVersion.VERSION_17
44
- targetCompatibility JavaVersion.VERSION_17
38
+ buildTypes {
39
+ release {
40
+ minifyEnabled false
45
41
  }
42
+ }
46
43
 
47
- kotlinOptions {
48
- jvmTarget = '17'
49
- }
50
- }
44
+ lintOptions {
45
+ disable "GradleCompatible"
46
+ }
51
47
 
52
- react {
53
- jsRootDir = file("../src/")
54
- libraryName = "SolutionPlugin"
55
- codegenJavaPackageName = "com.solutionplugin"
48
+ compileOptions {
49
+ sourceCompatibility JavaVersion.VERSION_1_8
50
+ targetCompatibility JavaVersion.VERSION_1_8
51
+ }
56
52
  }
57
53
 
58
54
  repositories {
59
- mavenCentral()
60
- google()
55
+ mavenCentral()
56
+ google()
61
57
  }
62
58
 
59
+ def kotlin_version = getExtOrDefault("kotlinVersion")
60
+
63
61
  dependencies {
64
- implementation 'com.facebook.react:react-native:+'
65
- implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
66
- implementation "ai.advance.mobile-sdk.android:solution-lib:1.4.0"
62
+ implementation "com.facebook.react:react-android"
63
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
64
+ implementation "ai.advance.mobile-sdk.android:solution-lib:1.4.0"
65
+ }
66
+
67
+ react {
68
+ jsRootDir = file("../src/")
69
+ libraryName = "SolutionPlugin"
70
+ codegenJavaPackageName = "com.solutionplugin"
67
71
  }
@@ -16,7 +16,7 @@ export function getSDKVersion() {
16
16
  }
17
17
  export function getPluginVersion() {
18
18
  // This is a hardcoded value. Remember to update it manually on release.
19
- return Promise.resolve("1.4.0.remote");
19
+ return Promise.resolve("1.4.0.local");
20
20
  }
21
21
  export function start(url) {
22
22
  return NativeSolutionPlugin?.start(url) ?? Promise.reject(new Error('SolutionPlugin not available'));
@@ -1 +1 @@
1
- {"version":3,"names":["NativeSolutionPlugin","setThemeARGBColor","light","dark","Promise","reject","Error","setDarkThemeType","type","getSDKVersion","getPluginVersion","resolve","start","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,cAAc,wBAAwB;AACtC;;AAGA,OAAOA,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,SAASC,iBAAiBA,CAACC,KAAa,EAAEC,IAAY,EAAiB;EAC5E,OAAOH,oBAAoB,EAAEC,iBAAiB,CAACC,KAAK,EAAEC,IAAI,CAAC,IAAIC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC1H;AAEA,OAAO,SAASC,gBAAgBA,CAACC,IAAe,EAAiB;EAC/D,OAAOR,oBAAoB,EAAEO,gBAAgB,CAACC,IAAI,CAAC,IAAIJ,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAClH;AAEA,OAAO,SAASG,aAAaA,CAAA,EAAoB;EAC/C,OAAOT,oBAAoB,EAAES,aAAa,CAAC,CAAC,IAAIL,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC3G;AAEA,OAAO,SAASI,gBAAgBA,CAAA,EAAoB;EAClD;EACA,OAAON,OAAO,CAACO,OAAO,CAAC,cAAc,CAAC;AACxC;AAEA,OAAO,SAASC,KAAKA,CAACC,GAAW,EAAsB;EACrD,OAAOb,oBAAoB,EAAEY,KAAK,CAACC,GAAG,CAAC,IAAIT,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACtG","ignoreList":[]}
1
+ {"version":3,"names":["NativeSolutionPlugin","setThemeARGBColor","light","dark","Promise","reject","Error","setDarkThemeType","type","getSDKVersion","getPluginVersion","resolve","start","url"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA;AACA,cAAc,wBAAwB;AACtC;;AAGA,OAAOA,oBAAoB,MAAM,wBAAwB;AAEzD,OAAO,SAASC,iBAAiBA,CAACC,KAAa,EAAEC,IAAY,EAAiB;EAC5E,OAAOH,oBAAoB,EAAEC,iBAAiB,CAACC,KAAK,EAAEC,IAAI,CAAC,IAAIC,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC1H;AAEA,OAAO,SAASC,gBAAgBA,CAACC,IAAe,EAAiB;EAC/D,OAAOR,oBAAoB,EAAEO,gBAAgB,CAACC,IAAI,CAAC,IAAIJ,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAClH;AAEA,OAAO,SAASG,aAAaA,CAAA,EAAoB;EAC/C,OAAOT,oBAAoB,EAAES,aAAa,CAAC,CAAC,IAAIL,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AAC3G;AAEA,OAAO,SAASI,gBAAgBA,CAAA,EAAoB;EAClD;EACA,OAAON,OAAO,CAACO,OAAO,CAAC,aAAa,CAAC;AACvC;AAEA,OAAO,SAASC,KAAKA,CAACC,GAAW,EAAsB;EACrD,OAAOb,oBAAoB,EAAEY,KAAK,CAACC,GAAG,CAAC,IAAIT,OAAO,CAACC,MAAM,CAAC,IAAIC,KAAK,CAAC,8BAA8B,CAAC,CAAC;AACtG","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeSolutionPlugin.d.ts","sourceRoot":"","sources":["../../../src/NativeSolutionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;CACxC;;AAED,wBAAwE"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/D;AAED,wBAAgB,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAE/C;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAGlD;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAErD"}
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "solution-plugin",
3
- "version": "1.4.0-alpha.2",
3
+ "version": "1.4.0-alpha.3",
4
4
  "description": "A plugin to add two numbers using native code.",
5
5
  "main": "./lib/module/index.js",
6
6
  "source": "src/index.tsx",
7
7
  "react-native": "src/index.tsx",
8
- "types": "lib/typescript/index.d.ts",
8
+ "types": "lib/typescript/src/index.d.ts",
9
9
  "exports": {
10
10
  ".": {
11
11
  "source": "./src/index.tsx",
12
- "types": "./lib/typescript/index.d.ts",
12
+ "types": "./lib/typescript/src/index.d.ts",
13
13
  "default": "./lib/module/index.js"
14
14
  },
15
15
  "./package.json": "./package.json"
@@ -63,7 +63,6 @@
63
63
  "@eslint/eslintrc": "^3.3.0",
64
64
  "@eslint/js": "^9.22.0",
65
65
  "@evilmartians/lefthook": "^1.5.0",
66
- "@react-native-community/cli": "15.0.0-alpha.2",
67
66
  "@react-native/babel-preset": "0.79.2",
68
67
  "@react-native/eslint-config": "^0.78.0",
69
68
  "@release-it/conventional-changelog": "^9.0.2",
package/src/index.tsx CHANGED
@@ -19,7 +19,7 @@ export function getSDKVersion(): Promise<string> {
19
19
 
20
20
  export function getPluginVersion(): Promise<string> {
21
21
  // This is a hardcoded value. Remember to update it manually on release.
22
- return Promise.resolve("1.4.0.remote");
22
+ return Promise.resolve("1.4.0.local");
23
23
  }
24
24
 
25
25
  export function start(url: string): Promise<EndResult> {
@@ -1 +0,0 @@
1
- {"version":3,"file":"NativeSolutionPlugin.d.ts","sourceRoot":"","sources":["../../src/NativeSolutionPlugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,oBAAY,SAAS;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,aAAa,kBAAkB;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACvC;AAED,MAAM,WAAW,IAAK,SAAQ,WAA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