소스 검색

feat(pwa) add TWA generated files

j8
Saúl Ibarra Corretgé 4 년 전
부모
커밋
6030c32272

+ 31
- 0
twa-manifest.json 파일 보기

@@ -0,0 +1,31 @@
1
+{
2
+  "packageId": "org.jitsi.meet",
3
+  "host": "meet.jit.si",
4
+  "name": "Jitsi Meet",
5
+  "launcherName": "Jitsi Meet",
6
+  "display": "standalone",
7
+  "themeColor": "#2A3A4B",
8
+  "navigationColor": "#000000",
9
+  "navigationColorDark": "#000000",
10
+  "navigationDividerColor": "#000000",
11
+  "navigationDividerColorDark": "#000000",
12
+  "backgroundColor": "#2A3A4B",
13
+  "enableNotifications": false,
14
+  "startUrl": "/",
15
+  "iconUrl": "https://alpha.jitsi.net/static/pwa/icons/icon512.png",
16
+  "splashScreenFadeOutDuration": 300,
17
+  "signingKey": {
18
+    "path": "./android/app/debug.keystore",
19
+    "alias": "android"
20
+  },
21
+  "appVersionName": "1",
22
+  "appVersionCode": 1,
23
+  "shortcuts": [],
24
+  "generatorApp": "bubblewrap-cli",
25
+  "webManifestUrl": "https://alpha.jitsi.net/static/pwa/manifest.json",
26
+  "fallbackType": "customtabs",
27
+  "features": {},
28
+  "enableSiteSettingsShortcut": true,
29
+  "isChromeOSOnly": false,
30
+  "appVersion": "1"
31
+}

+ 196
- 0
twa/app/build.gradle 파일 보기

@@ -0,0 +1,196 @@
1
+/*
2
+ * Copyright 2019 Google Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *      http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+import groovy.xml.MarkupBuilder
18
+
19
+apply plugin: 'com.android.application'
20
+
21
+def twaManifest = [
22
+    applicationId: 'org.jitsi.meet',
23
+    hostName: 'meet.jit.si', // The domain being opened in the TWA.
24
+    launchUrl: '/', // The start path for the TWA. Must be relative to the domain.
25
+    name: 'Jitsi Meet', // The application name.
26
+    launcherName: 'Jitsi Meet', // The name shown on the Android Launcher.
27
+    themeColor: '#2A3A4B', // The color used for the status bar.
28
+    navigationColor: '#000000', // The color used for the navigation bar.
29
+    navigationColorDark: '#000000', // The color used for the dark navbar.
30
+    navigationDividerColor: '#000000', // The navbar divider color.
31
+    navigationDividerColorDark: '#000000', // The dark navbar divider color.
32
+    backgroundColor: '#2A3A4B', // The color used for the splash screen background.
33
+    enableNotifications: false, // Set to true to enable notification delegation.
34
+    // Every shortcut must include the following fields:
35
+    // - name: String that will show up in the shortcut.
36
+    // - short_name: Shorter string used if |name| is too long.
37
+    // - url: Absolute path of the URL to launch the app with (e.g '/create').
38
+    // - icon: Name of the resource in the drawable folder to use as an icon.
39
+    shortcuts: [],
40
+    // The duration of fade out animation in milliseconds to be played when removing splash screen.
41
+    splashScreenFadeOutDuration: 300,
42
+    generatorApp: 'bubblewrap-cli', // Application that generated the Android Project
43
+    // The fallback strategy for when Trusted Web Activity is not avilable. Possible values are
44
+    // 'customtabs' and 'webview'.
45
+    fallbackType: 'customtabs',
46
+    enableSiteSettingsShortcut: 'true',
47
+]
48
+
49
+android {
50
+    compileSdkVersion 29
51
+    defaultConfig {
52
+        applicationId "org.jitsi.meet"
53
+        minSdkVersion 19
54
+        targetSdkVersion 29
55
+        versionCode 1
56
+        versionName "1"
57
+
58
+        // The name for the application
59
+        resValue "string", "appName", twaManifest.name
60
+
61
+        // The name for the application on the Android Launcher
62
+        resValue "string", "launcherName", twaManifest.launcherName
63
+
64
+        // The URL that will be used when launching the TWA from the Android Launcher
65
+        def launchUrl = "https://" + twaManifest.hostName + twaManifest.launchUrl
66
+        resValue "string", "launchUrl", launchUrl
67
+
68
+        
69
+            // 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
71
+            // will probably give a better user experience for non-mobile devices.
72
+            resValue "string", "webManifestUrl", 'https://alpha.jitsi.net/static/pwa/manifest.json'
73
+        
74
+
75
+        // The hostname is used when building the intent-filter, so the TWA is able to
76
+        // handle Intents to open https://svgomg.firebaseapp.com.
77
+        resValue "string", "hostName", twaManifest.hostName
78
+
79
+        // This variable below expresses the relationship between the app and the site,
80
+        // as documented in the TWA documentation at
81
+        // https://developers.google.com/web/updates/2017/10/using-twa#set_up_digital_asset_links_in_an_android_app
82
+        // and is injected into the AndroidManifest.xml
83
+        resValue "string", "assetStatements",
84
+                '[{ \\"relation\\": [\\"delegate_permission/common.handle_all_urls\\"],' +
85
+                        '\\"target\\": {\\"namespace\\": \\"web\\", \\"site\\": \\"https://' +
86
+                        twaManifest.hostName + '\\"}}]'
87
+
88
+        // This attribute sets the status bar color for the TWA. It can be either set here or in
89
+        // `res/values/colors.xml`. Setting in both places is an error and the app will not
90
+        // compile. If not set, the status bar color defaults to #FFFFFF - white.
91
+        resValue "color", "colorPrimary", twaManifest.themeColor
92
+
93
+        // This attribute sets the navigation bar color for the TWA. It can be either set here or
94
+        // in `res/values/colors.xml`. Setting in both places is an error and the app will not
95
+        // compile. If not set, the navigation bar color defaults to #FFFFFF - white.
96
+        resValue "color", "navigationColor", twaManifest.navigationColor
97
+
98
+        // This attribute sets the dark navigation bar color for the TWA. It can be either set here
99
+        // or in `res/values/colors.xml`. Setting in both places is an error and the app will not
100
+        // compile. If not set, the navigation bar color defaults to #000000 - black.
101
+        resValue "color", "navigationColorDark", twaManifest.navigationColorDark
102
+
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 
105
+        // will not compile. If not set, the divider color defaults to #00000000 - transparent.
106
+        resValue "color", "navigationDividerColor", twaManifest.navigationDividerColor
107
+
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 
110
+        //app will not compile. If not set, the divider color defaults to #000000 - black.
111
+        resValue "color", "navigationDividerColorDark", twaManifest.navigationDividerColorDark
112
+
113
+        // Sets the color for the background used for the splash screen when launching the
114
+        // Trusted Web Activity.
115
+        resValue "color", "backgroundColor", twaManifest.backgroundColor
116
+
117
+        // Defines a provider authority fot the Splash Screen
118
+        resValue "string", "providerAuthority", twaManifest.applicationId + '.fileprovider'
119
+
120
+        // The enableNotification resource is used to enable or disable the
121
+        // TrustedWebActivityService, by changing the android:enabled and android:exported
122
+        // attributes
123
+        resValue "bool", "enableNotification", twaManifest.enableNotifications.toString()
124
+
125
+        twaManifest.shortcuts.eachWithIndex { shortcut, index ->
126
+            resValue "string", "shortcut_name_$index", "$shortcut.name"
127
+            resValue "string", "shortcut_short_name_$index", "$shortcut.short_name"
128
+        }
129
+
130
+        // The splashScreenFadeOutDuration resource is used to set the duration of fade out animation in milliseconds
131
+        // to be played when removing splash screen. The default is 0 (no animation).
132
+        resValue "integer", "splashScreenFadeOutDuration", twaManifest.splashScreenFadeOutDuration.toString()
133
+
134
+        resValue "string", "generatorApp", twaManifest.generatorApp
135
+
136
+        resValue "string", "fallbackType", twaManifest.fallbackType
137
+
138
+        resValue "bool", "enableSiteSettingsShortcut", twaManifest.enableSiteSettingsShortcut
139
+    }
140
+    buildTypes {
141
+        release {
142
+            minifyEnabled true
143
+        }
144
+    }
145
+    compileOptions {
146
+        sourceCompatibility JavaVersion.VERSION_1_8
147
+        targetCompatibility JavaVersion.VERSION_1_8
148
+    }
149
+}
150
+
151
+task generateShorcutsFile {
152
+    assert twaManifest.shortcuts.size() < 5, "You can have at most 4 shortcuts."
153
+    twaManifest.shortcuts.eachWithIndex { s, i ->
154
+        assert s.name != null, 'Missing `name` in shortcut #' + i
155
+        assert s.short_name != null, 'Missing `short_name` in shortcut #' + i
156
+        assert s.url != null, 'Missing `icon` in shortcut #' + i
157
+        assert s.icon != null, 'Missing `url` in shortcut #' + i
158
+    }
159
+
160
+    def shortcutsFile = new File("$projectDir/src/main/res/xml", "shortcuts.xml")
161
+
162
+    def xmlWriter = new StringWriter()
163
+    def xmlMarkup = new MarkupBuilder(new IndentPrinter(xmlWriter, "    ", true))
164
+
165
+    xmlMarkup
166
+        .'shortcuts'('xmlns:android': 'http://schemas.android.com/apk/res/android') {
167
+            twaManifest.shortcuts.eachWithIndex { s, i ->
168
+                'shortcut'(
169
+                        'android:shortcutId': 'shortcut' + i,
170
+                        'android:enabled': 'true',
171
+                        'android:icon': '@drawable/' + s.icon,
172
+                        'android:shortcutShortLabel': '@string/shortcut_short_name_' + i,
173
+                        'android:shortcutLongLabel': '@string/shortcut_name_' + i) {
174
+                    'intent'(
175
+                            'android:action': 'android.intent.action.MAIN',
176
+                            'android:targetPackage': twaManifest.applicationId,
177
+                            'android:targetClass': twaManifest.applicationId + '.LauncherActivity',
178
+                            'android:data': s.url)
179
+                    'categories'('android:name': 'android.intent.category.LAUNCHER')
180
+                }
181
+            }
182
+        }
183
+    shortcutsFile.text = xmlWriter.toString() + '\n'
184
+}
185
+
186
+preBuild.dependsOn(generateShorcutsFile)
187
+
188
+repositories {
189
+    
190
+}
191
+
192
+dependencies {
193
+    implementation fileTree(include: ['*.jar'], dir: 'libs')
194
+    
195
+    implementation 'com.google.androidbrowserhelper:androidbrowserhelper:2.0.0'    
196
+}

+ 149
- 0
twa/app/src/main/AndroidManifest.xml 파일 보기

@@ -0,0 +1,149 @@
1
+<!--
2
+    Copyright 2019 Google Inc. All Rights Reserved.
3
+
4
+     Licensed under the Apache License, Version 2.0 (the "License");
5
+     you may not use this file except in compliance with the License.
6
+     You may obtain a copy of the License at
7
+
8
+         http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+     Unless required by applicable law or agreed to in writing, software
11
+     distributed under the License is distributed on an "AS IS" BASIS,
12
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+     See the License for the specific language governing permissions and
14
+     limitations under the License.
15
+-->
16
+
17
+<!-- The "package" attribute is rewritten by the Gradle build with the value of applicationId.
18
+     It is still required here, as it is used to derive paths, for instance when referring
19
+     to an Activity by ".MyActivity" instead of the full name. If more Activities are added to the
20
+     application, the package attribute will need to reflect the correct path in order to use
21
+     the abbreviated format. -->
22
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
23
+    package="org.jitsi.meet">
24
+
25
+    
26
+
27
+    
28
+
29
+    <application
30
+        android:name="Application"
31
+        android:allowBackup="true"
32
+        android:icon="@mipmap/ic_launcher"
33
+        android:label="@string/appName"
34
+        
35
+        android:manageSpaceActivity="com.google.androidbrowserhelper.trusted.ManageDataLauncherActivity"
36
+        
37
+        android:supportsRtl="true"
38
+        android:theme="@android:style/Theme.Translucent.NoTitleBar">
39
+
40
+        <meta-data
41
+            android:name="asset_statements"
42
+            android:resource="@string/assetStatements" />
43
+
44
+        
45
+            <meta-data
46
+                android:name="web_manifest_url"
47
+                android:value="@string/webManifestUrl" />
48
+        
49
+
50
+        <meta-data
51
+            android:name="twa_generator"
52
+            android:value="@string/generatorApp" />
53
+
54
+        
55
+            <activity android:name="com.google.androidbrowserhelper.trusted.ManageDataLauncherActivity">
56
+            <meta-data
57
+                android:name="android.support.customtabs.trusted.MANAGE_SPACE_URL"
58
+                android:value="@string/launchUrl" />
59
+            </activity>
60
+        
61
+        
62
+        <activity android:name="LauncherActivity"
63
+            android:label="@string/launcherName">
64
+            <meta-data android:name="android.support.customtabs.trusted.DEFAULT_URL"
65
+                android:value="@string/launchUrl" />
66
+
67
+            <meta-data
68
+                android:name="android.support.customtabs.trusted.STATUS_BAR_COLOR"
69
+                android:resource="@color/colorPrimary" />
70
+
71
+            <meta-data
72
+                android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR"
73
+                android:resource="@color/navigationColor" />
74
+
75
+            <meta-data
76
+                android:name="android.support.customtabs.trusted.NAVIGATION_BAR_COLOR_DARK"
77
+                android:resource="@color/navigationColorDark" />
78
+
79
+            <meta-data
80
+                android:name="androix.browser.trusted.NAVIGATION_BAR_DIVIDER_COLOR"
81
+                android:resource="@color/navigationDividerColor" />
82
+
83
+            <meta-data
84
+                android:name="androix.browser.trusted.NAVIGATION_BAR_DIVIDER_COLOR_DARK"
85
+                android:resource="@color/navigationDividerColorDark" />
86
+
87
+            <meta-data android:name="android.support.customtabs.trusted.SPLASH_IMAGE_DRAWABLE"
88
+                android:resource="@drawable/splash"/>
89
+
90
+            <meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_BACKGROUND_COLOR"
91
+                android:resource="@color/backgroundColor"/>
92
+
93
+            <meta-data android:name="android.support.customtabs.trusted.SPLASH_SCREEN_FADE_OUT_DURATION"
94
+                android:value="@integer/splashScreenFadeOutDuration"/>
95
+
96
+            <meta-data android:name="android.support.customtabs.trusted.FILE_PROVIDER_AUTHORITY"
97
+                android:value="@string/providerAuthority"/>
98
+
99
+            <meta-data android:name="android.app.shortcuts" android:resource="@xml/shortcuts" />
100
+
101
+            <meta-data android:name="android.support.customtabs.trusted.FALLBACK_STRATEGY"
102
+                android:value="@string/fallbackType" />
103
+
104
+            
105
+            <intent-filter>
106
+                <action android:name="android.intent.action.MAIN" />
107
+                <category android:name="android.intent.category.LAUNCHER" />
108
+            </intent-filter>
109
+
110
+            <intent-filter android:autoVerify="true">
111
+                <action android:name="android.intent.action.VIEW"/>
112
+                <category android:name="android.intent.category.DEFAULT" />
113
+                <category android:name="android.intent.category.BROWSABLE"/>
114
+                <data android:scheme="https"
115
+                    android:host="@string/hostName"/>
116
+            </intent-filter>
117
+        </activity>
118
+
119
+        <activity android:name="com.google.androidbrowserhelper.trusted.FocusActivity" />
120
+
121
+        <activity android:name="com.google.androidbrowserhelper.trusted.WebViewFallbackActivity"
122
+            android:configChanges="orientation|screenSize" />
123
+
124
+        <provider
125
+            android:name="androidx.core.content.FileProvider"
126
+            android:authorities="@string/providerAuthority"
127
+            android:grantUriPermissions="true"
128
+            android:exported="false">
129
+            <meta-data
130
+                android:name="android.support.FILE_PROVIDER_PATHS"
131
+                android:resource="@xml/filepaths" />
132
+        </provider>
133
+
134
+        <service
135
+            android:name="com.google.androidbrowserhelper.trusted.DelegationService"
136
+            android:enabled="@bool/enableNotification"
137
+            android:exported="@bool/enableNotification">
138
+
139
+            
140
+
141
+            <intent-filter>
142
+                <action android:name="android.support.customtabs.trusted.TRUSTED_WEB_ACTIVITY_SERVICE"/>
143
+                <category android:name="android.intent.category.DEFAULT"/>
144
+            </intent-filter>
145
+        </service>
146
+
147
+        
148
+    </application>
149
+</manifest>

+ 29
- 0
twa/app/src/main/java/org/jitsi/meet/Application.java 파일 보기

@@ -0,0 +1,29 @@
1
+/*
2
+ * Copyright 2020 Google Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *      http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+package org.jitsi.meet;
17
+
18
+
19
+
20
+public class Application extends android.app.Application {
21
+
22
+  
23
+
24
+  @Override
25
+  public void onCreate() {
26
+      super.onCreate();
27
+      
28
+  }
29
+}

+ 37
- 0
twa/app/src/main/java/org/jitsi/meet/LauncherActivity.java 파일 보기

@@ -0,0 +1,37 @@
1
+/*
2
+ * Copyright 2020 Google Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *      http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+package org.jitsi.meet;
17
+
18
+import android.net.Uri;
19
+
20
+
21
+
22
+public class LauncherActivity
23
+        extends com.google.androidbrowserhelper.trusted.LauncherActivity {
24
+    
25
+
26
+    
27
+
28
+    @Override
29
+    protected Uri getLaunchingUrl() {
30
+        // Get the original launch Url.
31
+        Uri uri = super.getLaunchingUrl();
32
+
33
+        
34
+
35
+        return uri;
36
+    }
37
+}

+ 25
- 0
twa/app/src/main/res/drawable-anydpi/shortcut_legacy_background.xml 파일 보기

@@ -0,0 +1,25 @@
1
+<!--
2
+    Copyright 2020 Google Inc. All Rights Reserved.
3
+
4
+     Licensed under the Apache License, Version 2.0 (the "License");
5
+     you may not use this file except in compliance with the License.
6
+     You may obtain a copy of the License at
7
+
8
+         http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+     Unless required by applicable law or agreed to in writing, software
11
+     distributed under the License is distributed on an "AS IS" BASIS,
12
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+     See the License for the specific language governing permissions and
14
+     limitations under the License.
15
+-->
16
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
17
+    xmlns:aapt="http://schemas.android.com/aapt"
18
+    android:inset="2dp">
19
+    <aapt:attr name="android:drawable">
20
+        <shape android:shape="oval">
21
+            <solid android:color="@color/shortcut_background" />
22
+            <size android:width="44dp" android:height="44dp" />
23
+        </shape>
24
+    </aapt:attr>
25
+</inset>

BIN
twa/app/src/main/res/drawable-hdpi/splash.png 파일 보기


BIN
twa/app/src/main/res/drawable-mdpi/splash.png 파일 보기


BIN
twa/app/src/main/res/drawable-xhdpi/splash.png 파일 보기


BIN
twa/app/src/main/res/drawable-xxhdpi/splash.png 파일 보기


BIN
twa/app/src/main/res/drawable-xxxhdpi/splash.png 파일 보기


BIN
twa/app/src/main/res/mipmap-hdpi/ic_launcher.png 파일 보기


BIN
twa/app/src/main/res/mipmap-mdpi/ic_launcher.png 파일 보기


BIN
twa/app/src/main/res/mipmap-xhdpi/ic_launcher.png 파일 보기


BIN
twa/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 파일 보기


BIN
twa/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 파일 보기


+ 1
- 0
twa/app/src/main/res/raw/web_app_manifest.json 파일 보기

@@ -0,0 +1 @@
1
+{"android_package_name":"org.jitsi.meet","prefer_related_applications":true,"related_applications":[{"id":"org.jitsi.meet","platform":"chromeos_play"}],"short_name":"Jitsi Meet","name":"Jitsi Meet","icons":[{"src":"icons/icon192.png","type":"image/png","sizes":"192x192"},{"src":"icons/icon512.png","type":"image/png","sizes":"512x512"}],"start_url":"/","background_color":"#2a3a4b","display":"standalone","scope":"/","theme_color":"#2a3a4b"}

+ 18
- 0
twa/app/src/main/res/values/colors.xml 파일 보기

@@ -0,0 +1,18 @@
1
+<!--
2
+    Copyright 2020 Google Inc. All Rights Reserved.
3
+
4
+     Licensed under the Apache License, Version 2.0 (the "License");
5
+     you may not use this file except in compliance with the License.
6
+     You may obtain a copy of the License at
7
+
8
+         http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+     Unless required by applicable law or agreed to in writing, software
11
+     distributed under the License is distributed on an "AS IS" BASIS,
12
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+     See the License for the specific language governing permissions and
14
+     limitations under the License.
15
+-->
16
+<resources>
17
+    <color name="shortcut_background">#F5F5F5</color>
18
+</resources>

+ 18
- 0
twa/app/src/main/res/xml/filepaths.xml 파일 보기

@@ -0,0 +1,18 @@
1
+<!--
2
+    Copyright 2019 Google Inc. All Rights Reserved.
3
+
4
+     Licensed under the Apache License, Version 2.0 (the "License");
5
+     you may not use this file except in compliance with the License.
6
+     You may obtain a copy of the License at
7
+
8
+         http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+     Unless required by applicable law or agreed to in writing, software
11
+     distributed under the License is distributed on an "AS IS" BASIS,
12
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+     See the License for the specific language governing permissions and
14
+     limitations under the License.
15
+-->
16
+<paths>
17
+    <files-path path="twa_splash/" name="twa_splash" />
18
+</paths>

+ 1
- 0
twa/app/src/main/res/xml/shortcuts.xml 파일 보기

@@ -0,0 +1 @@
1
+<shortcuts xmlns:android='http://schemas.android.com/apk/res/android' />

+ 42
- 0
twa/build.gradle 파일 보기

@@ -0,0 +1,42 @@
1
+/*
2
+ * Copyright 2019 Google Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ *      http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
18
+
19
+buildscript {
20
+
21
+    repositories {
22
+        google()
23
+        jcenter()
24
+    }
25
+    dependencies {
26
+        classpath 'com.android.tools.build:gradle:4.0.0'
27
+
28
+        // NOTE: Do not place your application dependencies here; they belong
29
+        // in the individual module build.gradle files
30
+    }
31
+}
32
+
33
+allprojects {
34
+    repositories {
35
+        google()
36
+        jcenter()
37
+    }
38
+}
39
+
40
+task clean(type: Delete) {
41
+    delete rootProject.buildDir
42
+}

+ 14
- 0
twa/gradle.properties 파일 보기

@@ -0,0 +1,14 @@
1
+# Project-wide Gradle settings.
2
+# IDE (e.g. Android Studio) users:
3
+# Gradle settings configured through the IDE *will override*
4
+# any settings specified in this file.
5
+# For more details on how to configure your build environment visit
6
+# http://www.gradle.org/docs/current/userguide/build_environment.html
7
+# Specifies the JVM arguments used for the daemon process.
8
+# The setting is particularly useful for tweaking memory settings.
9
+org.gradle.jvmargs=-Xmx1536m
10
+# When configured, Gradle will run in incubating parallel mode.
11
+# This option should only be used with decoupled projects. More details, visit
12
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13
+# org.gradle.parallel=true
14
+android.useAndroidX=true

BIN
twa/gradle/wrapper/gradle-wrapper.jar 파일 보기


+ 5
- 0
twa/gradle/wrapper/gradle-wrapper.properties 파일 보기

@@ -0,0 +1,5 @@
1
+distributionBase=GRADLE_USER_HOME
2
+distributionPath=wrapper/dists
3
+zipStoreBase=GRADLE_USER_HOME
4
+zipStorePath=wrapper/dists
5
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip

+ 188
- 0
twa/gradlew 파일 보기

@@ -0,0 +1,188 @@
1
+#!/usr/bin/env sh
2
+
3
+#
4
+# Copyright 2015 the original author or authors.
5
+#
6
+# Licensed under the Apache License, Version 2.0 (the "License");
7
+# you may not use this file except in compliance with the License.
8
+# You may obtain a copy of the License at
9
+#
10
+#      https://www.apache.org/licenses/LICENSE-2.0
11
+#
12
+# Unless required by applicable law or agreed to in writing, software
13
+# distributed under the License is distributed on an "AS IS" BASIS,
14
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+# See the License for the specific language governing permissions and
16
+# limitations under the License.
17
+#
18
+
19
+##############################################################################
20
+##
21
+##  Gradle start up script for UN*X
22
+##
23
+##############################################################################
24
+
25
+# Attempt to set APP_HOME
26
+# Resolve links: $0 may be a link
27
+PRG="$0"
28
+# Need this for relative symlinks.
29
+while [ -h "$PRG" ] ; do
30
+    ls=`ls -ld "$PRG"`
31
+    link=`expr "$ls" : '.*-> \(.*\)$'`
32
+    if expr "$link" : '/.*' > /dev/null; then
33
+        PRG="$link"
34
+    else
35
+        PRG=`dirname "$PRG"`"/$link"
36
+    fi
37
+done
38
+SAVED="`pwd`"
39
+cd "`dirname \"$PRG\"`/" >/dev/null
40
+APP_HOME="`pwd -P`"
41
+cd "$SAVED" >/dev/null
42
+
43
+APP_NAME="Gradle"
44
+APP_BASE_NAME=`basename "$0"`
45
+
46
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48
+
49
+# Use the maximum available, or set MAX_FD != -1 to use that value.
50
+MAX_FD="maximum"
51
+
52
+warn () {
53
+    echo "$*"
54
+}
55
+
56
+die () {
57
+    echo
58
+    echo "$*"
59
+    echo
60
+    exit 1
61
+}
62
+
63
+# OS specific support (must be 'true' or 'false').
64
+cygwin=false
65
+msys=false
66
+darwin=false
67
+nonstop=false
68
+case "`uname`" in
69
+  CYGWIN* )
70
+    cygwin=true
71
+    ;;
72
+  Darwin* )
73
+    darwin=true
74
+    ;;
75
+  MINGW* )
76
+    msys=true
77
+    ;;
78
+  NONSTOP* )
79
+    nonstop=true
80
+    ;;
81
+esac
82
+
83
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84
+
85
+# Determine the Java command to use to start the JVM.
86
+if [ -n "$JAVA_HOME" ] ; then
87
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88
+        # IBM's JDK on AIX uses strange locations for the executables
89
+        JAVACMD="$JAVA_HOME/jre/sh/java"
90
+    else
91
+        JAVACMD="$JAVA_HOME/bin/java"
92
+    fi
93
+    if [ ! -x "$JAVACMD" ] ; then
94
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95
+
96
+Please set the JAVA_HOME variable in your environment to match the
97
+location of your Java installation."
98
+    fi
99
+else
100
+    JAVACMD="java"
101
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102
+
103
+Please set the JAVA_HOME variable in your environment to match the
104
+location of your Java installation."
105
+fi
106
+
107
+# Increase the maximum file descriptors if we can.
108
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109
+    MAX_FD_LIMIT=`ulimit -H -n`
110
+    if [ $? -eq 0 ] ; then
111
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112
+            MAX_FD="$MAX_FD_LIMIT"
113
+        fi
114
+        ulimit -n $MAX_FD
115
+        if [ $? -ne 0 ] ; then
116
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
117
+        fi
118
+    else
119
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120
+    fi
121
+fi
122
+
123
+# For Darwin, add options to specify how the application appears in the dock
124
+if $darwin; then
125
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126
+fi
127
+
128
+# For Cygwin or MSYS, switch paths to Windows format before running java
129
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132
+    JAVACMD=`cygpath --unix "$JAVACMD"`
133
+
134
+    # We build the pattern for arguments to be converted via cygpath
135
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136
+    SEP=""
137
+    for dir in $ROOTDIRSRAW ; do
138
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
139
+        SEP="|"
140
+    done
141
+    OURCYGPATTERN="(^($ROOTDIRS))"
142
+    # Add a user-defined pattern to the cygpath arguments
143
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145
+    fi
146
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
147
+    i=0
148
+    for arg in "$@" ; do
149
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
151
+
152
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
153
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154
+        else
155
+            eval `echo args$i`="\"$arg\""
156
+        fi
157
+        i=$((i+1))
158
+    done
159
+    case $i in
160
+        (0) set -- ;;
161
+        (1) set -- "$args0" ;;
162
+        (2) set -- "$args0" "$args1" ;;
163
+        (3) set -- "$args0" "$args1" "$args2" ;;
164
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170
+    esac
171
+fi
172
+
173
+# Escape application args
174
+save () {
175
+    for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176
+    echo " "
177
+}
178
+APP_ARGS=$(save "$@")
179
+
180
+# Collect all arguments for the java command, following the shell quoting and substitution rules
181
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182
+
183
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185
+  cd "$(dirname "$0")"
186
+fi
187
+
188
+exec "$JAVACMD" "$@"

+ 100
- 0
twa/gradlew.bat 파일 보기

@@ -0,0 +1,100 @@
1
+@rem
2
+@rem Copyright 2015 the original author or authors.
3
+@rem
4
+@rem Licensed under the Apache License, Version 2.0 (the "License");
5
+@rem you may not use this file except in compliance with the License.
6
+@rem You may obtain a copy of the License at
7
+@rem
8
+@rem      https://www.apache.org/licenses/LICENSE-2.0
9
+@rem
10
+@rem Unless required by applicable law or agreed to in writing, software
11
+@rem distributed under the License is distributed on an "AS IS" BASIS,
12
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+@rem See the License for the specific language governing permissions and
14
+@rem limitations under the License.
15
+@rem
16
+
17
+@if "%DEBUG%" == "" @echo off
18
+@rem ##########################################################################
19
+@rem
20
+@rem  Gradle startup script for Windows
21
+@rem
22
+@rem ##########################################################################
23
+
24
+@rem Set local scope for the variables with windows NT shell
25
+if "%OS%"=="Windows_NT" setlocal
26
+
27
+set DIRNAME=%~dp0
28
+if "%DIRNAME%" == "" set DIRNAME=.
29
+set APP_BASE_NAME=%~n0
30
+set APP_HOME=%DIRNAME%
31
+
32
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34
+
35
+@rem Find java.exe
36
+if defined JAVA_HOME goto findJavaFromJavaHome
37
+
38
+set JAVA_EXE=java.exe
39
+%JAVA_EXE% -version >NUL 2>&1
40
+if "%ERRORLEVEL%" == "0" goto init
41
+
42
+echo.
43
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44
+echo.
45
+echo Please set the JAVA_HOME variable in your environment to match the
46
+echo location of your Java installation.
47
+
48
+goto fail
49
+
50
+:findJavaFromJavaHome
51
+set JAVA_HOME=%JAVA_HOME:"=%
52
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53
+
54
+if exist "%JAVA_EXE%" goto init
55
+
56
+echo.
57
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58
+echo.
59
+echo Please set the JAVA_HOME variable in your environment to match the
60
+echo location of your Java installation.
61
+
62
+goto fail
63
+
64
+:init
65
+@rem Get command-line arguments, handling Windows variants
66
+
67
+if not "%OS%" == "Windows_NT" goto win9xME_args
68
+
69
+:win9xME_args
70
+@rem Slurp the command line arguments.
71
+set CMD_LINE_ARGS=
72
+set _SKIP=2
73
+
74
+:win9xME_args_slurp
75
+if "x%~1" == "x" goto execute
76
+
77
+set CMD_LINE_ARGS=%*
78
+
79
+:execute
80
+@rem Setup the command line
81
+
82
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83
+
84
+@rem Execute Gradle
85
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86
+
87
+:end
88
+@rem End local scope for the variables with windows NT shell
89
+if "%ERRORLEVEL%"=="0" goto mainEnd
90
+
91
+:fail
92
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93
+rem the _cmd.exe /c_ return code!
94
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95
+exit /b 1
96
+
97
+:mainEnd
98
+if "%OS%"=="Windows_NT" endlocal
99
+
100
+:omega

+ 1
- 0
twa/settings.gradle 파일 보기

@@ -0,0 +1 @@
1
+include ':app'

BIN
twa/store_icon.png 파일 보기


Loading…
취소
저장