expo-libmpv 0.2.2 → 0.2.4

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,11 +1,7 @@
1
1
  apply plugin: 'com.android.library'
2
2
 
3
3
  group = 'com.libmpv'
4
- version = '0.1.0'
5
-
6
- def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
7
- apply from: expoModulesCorePlugin
8
- applyKotlinExpoModulesCorePlugin()
4
+ version = '0.2.4'
9
5
  useCoreDependencies()
10
6
  useExpoPublishing()
11
7
 
@@ -44,7 +40,7 @@ android {
44
40
  namespace "com.libmpv"
45
41
  defaultConfig {
46
42
  versionCode 1
47
- versionName "0.1.0"
43
+ versionName "0.2.4"
48
44
  }
49
45
  lintOptions {
50
46
  abortOnError false
package/app.json CHANGED
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "expo": {
3
+ "runtimeVersion": "0.2.4",
3
4
  "plugins": [
4
5
  [
5
6
  "expo-build-properties",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-libmpv",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "A libmpv Fabric component for Android",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -0,0 +1,71 @@
1
+ #! /usr/bin/python3
2
+
3
+ import os
4
+ import sys
5
+ import datetime
6
+
7
+ APP_JSON_PATH = './app.json'
8
+ PACKAGE_JSON_PATH = './package.json'
9
+ BUILD_GRADLE_PATH = './android/build.gradle'
10
+
11
+ version = None
12
+ with open(PACKAGE_JSON_PATH,'r') as read_handle:
13
+ for line in read_handle.readlines():
14
+ if 'version' in line:
15
+ version = line.split(':')[1].split(',')[0].strip()
16
+
17
+ if len(sys.argv) < 2:
18
+ print(f"Pass a new version. Current version is {version.replace('"','')}")
19
+ sys.exit(1)
20
+
21
+ if sys.argv[1] == 'read':
22
+ print(version.replace('"',''),end='')
23
+ sys.exit(0)
24
+
25
+ build_date = datetime.datetime.now().strftime('%B %d, %Y')
26
+ build_version = sys.argv[1]
27
+
28
+ def update_info(
29
+ input_path:str,
30
+ version_needle:str=None,
31
+ version_replacement:str=None,
32
+ build_needle:str=None,
33
+ build_replacement:str=None
34
+ ):
35
+ print(f"Updating {input_path}")
36
+ file_content = ''
37
+ with open(input_path,'r') as read_handle:
38
+ for line in read_handle.readlines():
39
+ if version_needle and version_needle in line:
40
+ file_content += version_replacement
41
+ elif build_needle and build_needle in line:
42
+ file_content += build_replacement
43
+ else:
44
+ file_content += line
45
+ with open(input_path,'w') as write_handle:
46
+ write_handle.write(file_content)
47
+
48
+ update_info(
49
+ input_path=APP_JSON_PATH,
50
+ version_needle='"runtimeVersion"',
51
+ version_replacement=f' "runtimeVersion": "{build_version}",\n'
52
+ )
53
+
54
+ update_info(
55
+ input_path=PACKAGE_JSON_PATH,
56
+ version_needle='"version"',
57
+ version_replacement=f' "version": "{build_version}",\n'
58
+ )
59
+
60
+ update_info(
61
+ input_path=BUILD_GRADLE_PATH,
62
+ version_needle='version = ',
63
+ version_replacement=f"version = '{build_version}'\n"
64
+ )
65
+
66
+
67
+ update_info(
68
+ input_path=BUILD_GRADLE_PATH,
69
+ version_needle='versionName',
70
+ version_replacement=f' versionName "{build_version}"\n'
71
+ )