瀏覽代碼

feat(pwa) update generated Android project

j8
Saúl Ibarra Corretgé 4 年之前
父節點
當前提交
a7fa9d8a97
共有 4 個檔案被更改,包括 27 行新增18 行删除
  1. 20
    14
      twa/app/build.gradle
  2. 2
    0
      twa/app/src/main/AndroidManifest.xml
  3. 2
    1
      twa/gradle/wrapper/gradle-wrapper.properties
  4. 3
    3
      twa/twa-manifest.json

+ 20
- 14
twa/app/build.gradle 查看文件

24
     launchUrl: '/', // The start path for the TWA. Must be relative to the domain.
24
     launchUrl: '/', // The start path for the TWA. Must be relative to the domain.
25
     name: 'Jitsi Meet', // The application name.
25
     name: 'Jitsi Meet', // The application name.
26
     launcherName: 'Jitsi Meet', // The name shown on the Android Launcher.
26
     launcherName: 'Jitsi Meet', // The name shown on the Android Launcher.
27
-    themeColor: '#2A3A4B', // The color used for the status bar.
27
+    themeColor: '#17A0DB', // The color used for the status bar.
28
     navigationColor: '#000000', // The color used for the navigation bar.
28
     navigationColor: '#000000', // The color used for the navigation bar.
29
     navigationColorDark: '#000000', // The color used for the dark navbar.
29
     navigationColorDark: '#000000', // The color used for the dark navbar.
30
     navigationDividerColor: '#000000', // The navbar divider color.
30
     navigationDividerColor: '#000000', // The navbar divider color.
31
     navigationDividerColorDark: '#000000', // The dark navbar divider color.
31
     navigationDividerColorDark: '#000000', // The dark navbar divider color.
32
-    backgroundColor: '#2A3A4B', // The color used for the splash screen background.
32
+    backgroundColor: '#17A0DB', // The color used for the splash screen background.
33
     enableNotifications: false, // Set to true to enable notification delegation.
33
     enableNotifications: false, // Set to true to enable notification delegation.
34
     // Every shortcut must include the following fields:
34
     // Every shortcut must include the following fields:
35
     // - name: String that will show up in the shortcut.
35
     // - name: String that will show up in the shortcut.
46
     enableSiteSettingsShortcut: 'true',
46
     enableSiteSettingsShortcut: 'true',
47
 ]
47
 ]
48
 
48
 
49
+// Use the number of seconds/10 since Jan 1 2019 as the versionCode.
50
+// This lets us upload a new build at most every 10 seconds for the
51
+// next ~680 years.
52
+// https://stackoverflow.com/a/38643838
53
+def vcode = (int) (((new Date().getTime() / 1000) - 1546297200) / 10)
54
+
49
 android {
55
 android {
50
     compileSdkVersion 29
56
     compileSdkVersion 29
51
     defaultConfig {
57
     defaultConfig {
52
         applicationId "org.jitsi.meet"
58
         applicationId "org.jitsi.meet"
53
         minSdkVersion 19
59
         minSdkVersion 19
54
         targetSdkVersion 29
60
         targetSdkVersion 29
55
-        versionCode 1
56
-        versionName "1"
61
+        versionCode vcode
62
+        versionName "20.5.0"
57
 
63
 
58
         // The name for the application
64
         // The name for the application
59
         resValue "string", "appName", twaManifest.name
65
         resValue "string", "appName", twaManifest.name
65
         def launchUrl = "https://" + twaManifest.hostName + twaManifest.launchUrl
71
         def launchUrl = "https://" + twaManifest.hostName + twaManifest.launchUrl
66
         resValue "string", "launchUrl", launchUrl
72
         resValue "string", "launchUrl", launchUrl
67
 
73
 
68
-        
74
+
69
             // The URL the Web Manifest for the Progressive Web App that the TWA points to. This
75
             // The URL the Web Manifest for the Progressive Web App that the TWA points to. This
70
             // is used by Chrome OS to open the Web version of the PWA instead of the TWA, as it
76
             // is used by Chrome OS to open the Web version of the PWA instead of the TWA, as it
71
             // will probably give a better user experience for non-mobile devices.
77
             // will probably give a better user experience for non-mobile devices.
72
-            resValue "string", "webManifestUrl", 'https://alpha.jitsi.net/static/pwa/manifest.json'
73
-        
78
+            resValue "string", "webManifestUrl", 'https://meet.jit.si/static/pwa/manifest.json'
79
+
74
 
80
 
75
         // The hostname is used when building the intent-filter, so the TWA is able to
81
         // The hostname is used when building the intent-filter, so the TWA is able to
76
         // handle Intents to open https://svgomg.firebaseapp.com.
82
         // handle Intents to open https://svgomg.firebaseapp.com.
100
         // compile. If not set, the navigation bar color defaults to #000000 - black.
106
         // compile. If not set, the navigation bar color defaults to #000000 - black.
101
         resValue "color", "navigationColorDark", twaManifest.navigationColorDark
107
         resValue "color", "navigationColorDark", twaManifest.navigationColorDark
102
 
108
 
103
-        // This attribute sets the navbar divider color for the TWA. It can be either 
104
-        // set here or in `res/values/colors.xml`. Setting in both places is an error and the app 
109
+        // This attribute sets the navbar divider color for the TWA. It can be either
110
+        // set here or in `res/values/colors.xml`. Setting in both places is an error and the app
105
         // will not compile. If not set, the divider color defaults to #00000000 - transparent.
111
         // will not compile. If not set, the divider color defaults to #00000000 - transparent.
106
         resValue "color", "navigationDividerColor", twaManifest.navigationDividerColor
112
         resValue "color", "navigationDividerColor", twaManifest.navigationDividerColor
107
 
113
 
108
-        // This attribute sets the dark navbar divider color for the TWA. It can be either 
109
-        // set here or in `res/values/colors.xml`. Setting in both places is an error and the 
114
+        // This attribute sets the dark navbar divider color for the TWA. It can be either
115
+        // set here or in `res/values/colors.xml`. Setting in both places is an error and the
110
         //app will not compile. If not set, the divider color defaults to #000000 - black.
116
         //app will not compile. If not set, the divider color defaults to #000000 - black.
111
         resValue "color", "navigationDividerColorDark", twaManifest.navigationDividerColorDark
117
         resValue "color", "navigationDividerColorDark", twaManifest.navigationDividerColorDark
112
 
118
 
186
 preBuild.dependsOn(generateShorcutsFile)
192
 preBuild.dependsOn(generateShorcutsFile)
187
 
193
 
188
 repositories {
194
 repositories {
189
-    
195
+
190
 }
196
 }
191
 
197
 
192
 dependencies {
198
 dependencies {
193
     implementation fileTree(include: ['*.jar'], dir: 'libs')
199
     implementation fileTree(include: ['*.jar'], dir: 'libs')
194
-    
195
-    implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.0.0'    
200
+
201
+    implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.0.0'
196
 }
202
 }

+ 2
- 0
twa/app/src/main/AndroidManifest.xml 查看文件

25
     
25
     
26
 
26
 
27
     
27
     
28
+    <uses-feature android:name="org.chromium.arc" android:required="true" />
29
+    
28
 
30
 
29
     <application
31
     <application
30
         android:name="Application"
32
         android:name="Application"

+ 2
- 1
twa/gradle/wrapper/gradle-wrapper.properties 查看文件

1
+#Wed Oct 14 15:52:23 CEST 2020
1
 distributionBase=GRADLE_USER_HOME
2
 distributionBase=GRADLE_USER_HOME
2
 distributionPath=wrapper/dists
3
 distributionPath=wrapper/dists
3
 zipStoreBase=GRADLE_USER_HOME
4
 zipStoreBase=GRADLE_USER_HOME
4
 zipStorePath=wrapper/dists
5
 zipStorePath=wrapper/dists
5
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
6
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

+ 3
- 3
twa/twa-manifest.json 查看文件

18
     "path": "./jitsi-upload.keystore",
18
     "path": "./jitsi-upload.keystore",
19
     "alias": "upload"
19
     "alias": "upload"
20
   },
20
   },
21
-  "appVersionName": "1",
22
-  "appVersionCode": 1,
21
+  "appVersionName": "20.5.0",
22
+  "appVersionCode": 3,
23
   "shortcuts": [],
23
   "shortcuts": [],
24
   "generatorApp": "bubblewrap-cli",
24
   "generatorApp": "bubblewrap-cli",
25
   "webManifestUrl": "https://meet.jit.si/static/pwa/manifest.json",
25
   "webManifestUrl": "https://meet.jit.si/static/pwa/manifest.json",
27
   "features": {},
27
   "features": {},
28
   "enableSiteSettingsShortcut": true,
28
   "enableSiteSettingsShortcut": true,
29
   "isChromeOSOnly": true,
29
   "isChromeOSOnly": true,
30
-  "appVersion": "1"
30
+  "appVersion": "20.5.0"
31
 }
31
 }

Loading…
取消
儲存