Skip to content

Commit 93511b7

Browse files
committedJun 9, 2020
[Jetsnack] Initial commit.
Change-Id: I74bc1a5aae92014271deca57ace6b8c419baba4c
1 parent 2b8365e commit 93511b7

30 files changed

+1012
-0
lines changed
 

‎Jetsnack/.gitignore

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx
15+
local.properties

‎Jetsnack/app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

‎Jetsnack/app/build.gradle

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
plugins {
18+
id 'com.android.application'
19+
id 'kotlin-android'
20+
}
21+
22+
android {
23+
compileSdkVersion 29
24+
25+
defaultConfig {
26+
applicationId "com.example.jetsnack"
27+
minSdkVersion 21
28+
targetSdkVersion 29
29+
versionCode 1
30+
versionName "1.0"
31+
32+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
33+
}
34+
35+
buildTypes {
36+
release {
37+
minifyEnabled false
38+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
39+
}
40+
}
41+
42+
compileOptions {
43+
sourceCompatibility JavaVersion.VERSION_1_8
44+
targetCompatibility JavaVersion.VERSION_1_8
45+
}
46+
47+
kotlinOptions {
48+
jvmTarget = "1.8"
49+
apiVersion = "1.3"
50+
allWarningsAsErrors = true
51+
}
52+
53+
buildFeatures {
54+
compose true
55+
}
56+
57+
composeOptions {
58+
kotlinCompilerVersion "1.3.70-dev-withExperimentalGoogleExtensions-20200424"
59+
kotlinCompilerExtensionVersion compose_version
60+
}
61+
}
62+
63+
configurations {
64+
ktlint
65+
}
66+
67+
dependencies {
68+
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
69+
implementation('androidx.core:core-ktx:1.1.0') // don't update yet b/152023266
70+
implementation 'androidx.appcompat:appcompat:1.1.0'
71+
72+
implementation("androidx.ui:ui-core:$compose_version")
73+
implementation("androidx.ui:ui-layout:$compose_version")
74+
implementation("androidx.ui:ui-material:$compose_version")
75+
implementation("androidx.ui:ui-tooling:$compose_version")
76+
77+
ktlint "com.pinterest:ktlint:0.37.0"
78+
}
79+
80+
task ktlint(type: JavaExec, group: "verification") {
81+
description = "Check Kotlin code style."
82+
main = "com.pinterest.ktlint.Main"
83+
classpath = configurations.ktlint
84+
args "src/**/*.kt"
85+
}
86+
87+
check.dependsOn ktlint
88+
89+
task ktlintFormat(type: JavaExec, group: "formatting") {
90+
description = "Fix Kotlin code style deviations."
91+
main = "com.pinterest.ktlint.Main"
92+
classpath = configurations.ktlint
93+
args "-F", "src/**/*.kt"
94+
}

‎Jetsnack/app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
16+
package="com.example.jetsnack">
17+
18+
<application
19+
android:allowBackup="true"
20+
android:icon="@mipmap/ic_launcher"
21+
android:label="@string/app_name"
22+
android:supportsRtl="true"
23+
android:theme="@style/Theme.Jetsnack">
24+
<activity
25+
android:name=".ui.MainActivity"
26+
android:label="@string/app_name"
27+
android:theme="@style/Theme.Jetsnack">
28+
<intent-filter>
29+
<action android:name="android.intent.action.MAIN" />
30+
<category android:name="android.intent.category.LAUNCHER" />
31+
</intent-filter>
32+
</activity>
33+
</application>
34+
35+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui
18+
19+
import androidx.compose.Composable
20+
import androidx.ui.foundation.Text
21+
import com.example.jetsnack.ui.theme.AppTheme
22+
23+
@Composable
24+
fun JetsnackApp() {
25+
AppTheme {
26+
Text(text = "Jetsnack!")
27+
}
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui
18+
19+
import android.os.Bundle
20+
import androidx.appcompat.app.AppCompatActivity
21+
import androidx.ui.core.setContent
22+
23+
class MainActivity : AppCompatActivity() {
24+
override fun onCreate(savedInstanceState: Bundle?) {
25+
super.onCreate(savedInstanceState)
26+
setContent {
27+
JetsnackApp()
28+
}
29+
}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui.theme
18+
19+
import androidx.ui.graphics.Color
20+
21+
val Purple200 = Color(0xFFBB86FC)
22+
val Purple500 = Color(0xFF6200EE)
23+
val Purple700 = Color(0xFF3700B3)
24+
val Teal200 = Color(0xFF03DAC5)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui.theme
18+
19+
import androidx.ui.foundation.shape.corner.RoundedCornerShape
20+
import androidx.ui.material.Shapes
21+
import androidx.ui.unit.dp
22+
23+
val Shapes = Shapes(
24+
small = RoundedCornerShape(4.dp),
25+
medium = RoundedCornerShape(4.dp),
26+
large = RoundedCornerShape(0.dp)
27+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui.theme
18+
19+
import androidx.compose.Composable
20+
import androidx.ui.foundation.isSystemInDarkTheme
21+
import androidx.ui.material.MaterialTheme
22+
import androidx.ui.material.darkColorPalette
23+
import androidx.ui.material.lightColorPalette
24+
25+
private val DarkColorPalette = darkColorPalette(
26+
primary = Purple200,
27+
primaryVariant = Purple700,
28+
secondary = Teal200
29+
)
30+
31+
private val LightColorPalette = lightColorPalette(
32+
primary = Purple500,
33+
primaryVariant = Purple700,
34+
secondary = Teal200
35+
)
36+
37+
@Composable
38+
fun AppTheme(
39+
darkTheme: Boolean = isSystemInDarkTheme(),
40+
content: @Composable () -> Unit
41+
) {
42+
val colors = if (darkTheme) {
43+
DarkColorPalette
44+
} else {
45+
LightColorPalette
46+
}
47+
48+
MaterialTheme(
49+
colors = colors,
50+
typography = typography,
51+
shapes = Shapes,
52+
content = content
53+
)
54+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
package com.example.jetsnack.ui.theme
18+
19+
import androidx.ui.material.Typography
20+
import androidx.ui.text.TextStyle
21+
import androidx.ui.text.font.FontFamily
22+
import androidx.ui.text.font.FontWeight
23+
import androidx.ui.unit.sp
24+
25+
val typography = Typography(
26+
body1 = TextStyle(
27+
fontFamily = FontFamily.Default,
28+
fontWeight = FontWeight.Normal,
29+
fontSize = 16.sp
30+
)
31+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
16+
xmlns:aapt="http://schemas.android.com/aapt"
17+
android:width="108dp"
18+
android:height="108dp"
19+
android:viewportWidth="108"
20+
android:viewportHeight="108">
21+
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
22+
<aapt:attr name="android:fillColor">
23+
<gradient
24+
android:endX="85.84757"
25+
android:endY="92.4963"
26+
android:startX="42.9492"
27+
android:startY="49.59793"
28+
android:type="linear">
29+
<item
30+
android:color="#44000000"
31+
android:offset="0.0" />
32+
<item
33+
android:color="#00000000"
34+
android:offset="1.0" />
35+
</gradient>
36+
</aapt:attr>
37+
</path>
38+
<path
39+
android:fillColor="#FFFFFF"
40+
android:fillType="nonZero"
41+
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
42+
android:strokeWidth="1"
43+
android:strokeColor="#00000000" />
44+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
16+
android:width="108dp"
17+
android:height="108dp"
18+
android:viewportWidth="108"
19+
android:viewportHeight="108">
20+
<path
21+
android:fillColor="#3DDC84"
22+
android:pathData="M0,0h108v108h-108z" />
23+
<path
24+
android:fillColor="#00000000"
25+
android:pathData="M9,0L9,108"
26+
android:strokeWidth="0.8"
27+
android:strokeColor="#33FFFFFF" />
28+
<path
29+
android:fillColor="#00000000"
30+
android:pathData="M19,0L19,108"
31+
android:strokeWidth="0.8"
32+
android:strokeColor="#33FFFFFF" />
33+
<path
34+
android:fillColor="#00000000"
35+
android:pathData="M29,0L29,108"
36+
android:strokeWidth="0.8"
37+
android:strokeColor="#33FFFFFF" />
38+
<path
39+
android:fillColor="#00000000"
40+
android:pathData="M39,0L39,108"
41+
android:strokeWidth="0.8"
42+
android:strokeColor="#33FFFFFF" />
43+
<path
44+
android:fillColor="#00000000"
45+
android:pathData="M49,0L49,108"
46+
android:strokeWidth="0.8"
47+
android:strokeColor="#33FFFFFF" />
48+
<path
49+
android:fillColor="#00000000"
50+
android:pathData="M59,0L59,108"
51+
android:strokeWidth="0.8"
52+
android:strokeColor="#33FFFFFF" />
53+
<path
54+
android:fillColor="#00000000"
55+
android:pathData="M69,0L69,108"
56+
android:strokeWidth="0.8"
57+
android:strokeColor="#33FFFFFF" />
58+
<path
59+
android:fillColor="#00000000"
60+
android:pathData="M79,0L79,108"
61+
android:strokeWidth="0.8"
62+
android:strokeColor="#33FFFFFF" />
63+
<path
64+
android:fillColor="#00000000"
65+
android:pathData="M89,0L89,108"
66+
android:strokeWidth="0.8"
67+
android:strokeColor="#33FFFFFF" />
68+
<path
69+
android:fillColor="#00000000"
70+
android:pathData="M99,0L99,108"
71+
android:strokeWidth="0.8"
72+
android:strokeColor="#33FFFFFF" />
73+
<path
74+
android:fillColor="#00000000"
75+
android:pathData="M0,9L108,9"
76+
android:strokeWidth="0.8"
77+
android:strokeColor="#33FFFFFF" />
78+
<path
79+
android:fillColor="#00000000"
80+
android:pathData="M0,19L108,19"
81+
android:strokeWidth="0.8"
82+
android:strokeColor="#33FFFFFF" />
83+
<path
84+
android:fillColor="#00000000"
85+
android:pathData="M0,29L108,29"
86+
android:strokeWidth="0.8"
87+
android:strokeColor="#33FFFFFF" />
88+
<path
89+
android:fillColor="#00000000"
90+
android:pathData="M0,39L108,39"
91+
android:strokeWidth="0.8"
92+
android:strokeColor="#33FFFFFF" />
93+
<path
94+
android:fillColor="#00000000"
95+
android:pathData="M0,49L108,49"
96+
android:strokeWidth="0.8"
97+
android:strokeColor="#33FFFFFF" />
98+
<path
99+
android:fillColor="#00000000"
100+
android:pathData="M0,59L108,59"
101+
android:strokeWidth="0.8"
102+
android:strokeColor="#33FFFFFF" />
103+
<path
104+
android:fillColor="#00000000"
105+
android:pathData="M0,69L108,69"
106+
android:strokeWidth="0.8"
107+
android:strokeColor="#33FFFFFF" />
108+
<path
109+
android:fillColor="#00000000"
110+
android:pathData="M0,79L108,79"
111+
android:strokeWidth="0.8"
112+
android:strokeColor="#33FFFFFF" />
113+
<path
114+
android:fillColor="#00000000"
115+
android:pathData="M0,89L108,89"
116+
android:strokeWidth="0.8"
117+
android:strokeColor="#33FFFFFF" />
118+
<path
119+
android:fillColor="#00000000"
120+
android:pathData="M0,99L108,99"
121+
android:strokeWidth="0.8"
122+
android:strokeColor="#33FFFFFF" />
123+
<path
124+
android:fillColor="#00000000"
125+
android:pathData="M19,29L89,29"
126+
android:strokeWidth="0.8"
127+
android:strokeColor="#33FFFFFF" />
128+
<path
129+
android:fillColor="#00000000"
130+
android:pathData="M19,39L89,39"
131+
android:strokeWidth="0.8"
132+
android:strokeColor="#33FFFFFF" />
133+
<path
134+
android:fillColor="#00000000"
135+
android:pathData="M19,49L89,49"
136+
android:strokeWidth="0.8"
137+
android:strokeColor="#33FFFFFF" />
138+
<path
139+
android:fillColor="#00000000"
140+
android:pathData="M19,59L89,59"
141+
android:strokeWidth="0.8"
142+
android:strokeColor="#33FFFFFF" />
143+
<path
144+
android:fillColor="#00000000"
145+
android:pathData="M19,69L89,69"
146+
android:strokeWidth="0.8"
147+
android:strokeColor="#33FFFFFF" />
148+
<path
149+
android:fillColor="#00000000"
150+
android:pathData="M19,79L89,79"
151+
android:strokeWidth="0.8"
152+
android:strokeColor="#33FFFFFF" />
153+
<path
154+
android:fillColor="#00000000"
155+
android:pathData="M29,19L29,89"
156+
android:strokeWidth="0.8"
157+
android:strokeColor="#33FFFFFF" />
158+
<path
159+
android:fillColor="#00000000"
160+
android:pathData="M39,19L39,89"
161+
android:strokeWidth="0.8"
162+
android:strokeColor="#33FFFFFF" />
163+
<path
164+
android:fillColor="#00000000"
165+
android:pathData="M49,19L49,89"
166+
android:strokeWidth="0.8"
167+
android:strokeColor="#33FFFFFF" />
168+
<path
169+
android:fillColor="#00000000"
170+
android:pathData="M59,19L59,89"
171+
android:strokeWidth="0.8"
172+
android:strokeColor="#33FFFFFF" />
173+
<path
174+
android:fillColor="#00000000"
175+
android:pathData="M69,19L69,89"
176+
android:strokeWidth="0.8"
177+
android:strokeColor="#33FFFFFF" />
178+
<path
179+
android:fillColor="#00000000"
180+
android:pathData="M79,19L79,89"
181+
android:strokeWidth="0.8"
182+
android:strokeColor="#33FFFFFF" />
183+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
16+
<background android:drawable="@drawable/ic_launcher_background" />
17+
<foreground android:drawable="@drawable/ic_launcher_foreground" />
18+
</adaptive-icon>
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<resources>
16+
17+
<color name="nav_bar">@android:color/transparent</color>
18+
19+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<resources>
16+
<color name="immersive_sys_ui">#33000000</color>
17+
<color name="nav_bar">@color/immersive_sys_ui</color>
18+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<resources>
16+
<string name="app_name">Jetsnack</string>
17+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Copyright 2020 The Android Open Source Project
4+
5+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6+
in compliance with the License. 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 distributed under the License
11+
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12+
or implied. See the License for the specific language governing permissions and limitations under
13+
the License.
14+
-->
15+
<resources xmlns:tools="http://schemas.android.com/tools">
16+
17+
<style name="Theme.Jetsnack" parent="Theme.AppCompat.DayNight.NoActionBar">
18+
<item name="colorPrimary">#ff00ff</item>
19+
<item name="colorAccent">#ff00ff</item>
20+
<item name="android:statusBarColor">@color/immersive_sys_ui</item>
21+
<item name="android:navigationBarColor">@color/nav_bar</item>
22+
</style>
23+
24+
</resources>

‎Jetsnack/build.gradle

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright 2020 The Android Open Source Project
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+
buildscript {
18+
ext.kotlin_version = '1.3.72'
19+
ext.compose_version = '0.1.0-SNAPSHOT'
20+
repositories {
21+
google()
22+
jcenter()
23+
}
24+
dependencies {
25+
classpath 'com.android.tools.build:gradle:4.1.0-alpha10'
26+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
27+
}
28+
}
29+
30+
allprojects {
31+
repositories {
32+
def snapshot = "6543212"
33+
maven { url "https://androidx.dev/snapshots/builds/$snapshot/artifacts/ui/repository" }
34+
google()
35+
jcenter()
36+
}
37+
// Don't require parens on fun type annotations e.g. `@Composable~()~ () -> Unit`. Remove with KT1.4
38+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
39+
kotlinOptions {
40+
freeCompilerArgs += '-XXLanguage:+NonParenthesizedAnnotationsOnFunctionalTypes'
41+
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
42+
}
43+
}
44+
}

‎Jetsnack/gradle.properties

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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=-Xmx2048m
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+
# AndroidX package structure to make it clearer which packages are bundled with the
15+
# Android operating system, and which are packaged with your app"s APK
16+
# https://developer.android.com/topic/libraries/support-library/androidx-rn
17+
android.useAndroidX=true
18+
# Automatically convert third-party libraries to use AndroidX
19+
android.enableJetifier=true
20+
# Kotlin code style for this project: "official" or "obsolete":
21+
kotlin.code.style=official
53.1 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Tue Jun 09 11:14:49 BST 2020
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-milestone-1-bin.zip

‎Jetsnack/gradlew

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

‎Jetsnack/gradlew.bat

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@if "%DEBUG%" == "" @echo off
2+
@rem ##########################################################################
3+
@rem
4+
@rem Gradle startup script for Windows
5+
@rem
6+
@rem ##########################################################################
7+
8+
@rem Set local scope for the variables with windows NT shell
9+
if "%OS%"=="Windows_NT" setlocal
10+
11+
set DIRNAME=%~dp0
12+
if "%DIRNAME%" == "" set DIRNAME=.
13+
set APP_BASE_NAME=%~n0
14+
set APP_HOME=%DIRNAME%
15+
16+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17+
set DEFAULT_JVM_OPTS=
18+
19+
@rem Find java.exe
20+
if defined JAVA_HOME goto findJavaFromJavaHome
21+
22+
set JAVA_EXE=java.exe
23+
%JAVA_EXE% -version >NUL 2>&1
24+
if "%ERRORLEVEL%" == "0" goto init
25+
26+
echo.
27+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28+
echo.
29+
echo Please set the JAVA_HOME variable in your environment to match the
30+
echo location of your Java installation.
31+
32+
goto fail
33+
34+
:findJavaFromJavaHome
35+
set JAVA_HOME=%JAVA_HOME:"=%
36+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37+
38+
if exist "%JAVA_EXE%" goto init
39+
40+
echo.
41+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42+
echo.
43+
echo Please set the JAVA_HOME variable in your environment to match the
44+
echo location of your Java installation.
45+
46+
goto fail
47+
48+
:init
49+
@rem Get command-line arguments, handling Windows variants
50+
51+
if not "%OS%" == "Windows_NT" goto win9xME_args
52+
53+
:win9xME_args
54+
@rem Slurp the command line arguments.
55+
set CMD_LINE_ARGS=
56+
set _SKIP=2
57+
58+
:win9xME_args_slurp
59+
if "x%~1" == "x" goto execute
60+
61+
set CMD_LINE_ARGS=%*
62+
63+
:execute
64+
@rem Setup the command line
65+
66+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67+
68+
@rem Execute Gradle
69+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70+
71+
:end
72+
@rem End local scope for the variables with windows NT shell
73+
if "%ERRORLEVEL%"=="0" goto mainEnd
74+
75+
:fail
76+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77+
rem the _cmd.exe /c_ return code!
78+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79+
exit /b 1
80+
81+
:mainEnd
82+
if "%OS%"=="Windows_NT" endlocal
83+
84+
:omega

‎Jetsnack/settings.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include ':app'
2+
rootProject.name = "Jetsnack"

0 commit comments

Comments
 (0)
Please sign in to comment.