Skip to content

Commit 243e5ff

Browse files
committed
[Jetchat] Cleanup: directory rename, +spotless, +buildSrc
Change-Id: I636f0aed0f2a59acf544d4885a1641fda4565171
1 parent 5f25a2a commit 243e5ff

File tree

75 files changed

+350
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+350
-194
lines changed

JetChat/app/build.gradle

Lines changed: 0 additions & 117 deletions
This file was deleted.

JetChat/build.gradle

Lines changed: 0 additions & 48 deletions
This file was deleted.
File renamed without changes.

Jetchat/app/build.gradle

Lines changed: 94 additions & 0 deletions
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+
* https://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 com.example.compose.jetchat.buildsrc.Libs
18+
19+
plugins {
20+
id 'com.android.application'
21+
id 'kotlin-android'
22+
id 'kotlin-kapt'
23+
}
24+
25+
kapt {
26+
correctErrorTypes = true
27+
useBuildCache = true
28+
}
29+
30+
android {
31+
compileSdkVersion 30
32+
33+
defaultConfig {
34+
applicationId "com.example.compose.jetchat"
35+
minSdkVersion 21
36+
targetSdkVersion 30
37+
versionCode 1
38+
versionName '1.0'
39+
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
40+
41+
vectorDrawables.useSupportLibrary = true
42+
}
43+
44+
buildTypes {
45+
release {
46+
minifyEnabled false
47+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
48+
}
49+
}
50+
51+
compileOptions {
52+
sourceCompatibility JavaVersion.VERSION_1_8
53+
targetCompatibility JavaVersion.VERSION_1_8
54+
}
55+
56+
kotlinOptions {
57+
jvmTarget = "1.8"
58+
}
59+
60+
buildFeatures {
61+
compose true
62+
}
63+
64+
composeOptions {
65+
kotlinCompilerVersion Libs.AndroidX.Compose.kotlinCompilerVersion
66+
kotlinCompilerExtensionVersion Libs.AndroidX.Compose.version
67+
}
68+
69+
}
70+
71+
dependencies {
72+
implementation Libs.Kotlin.stdlib
73+
implementation Libs.Coroutines.android
74+
75+
implementation Libs.AndroidX.coreKtx
76+
implementation Libs.AndroidX.appcompat
77+
implementation Libs.AndroidX.Navigation.fragment
78+
implementation Libs.AndroidX.Navigation.uiKtx
79+
implementation Libs.material
80+
81+
implementation Libs.AndroidX.Compose.layout
82+
implementation Libs.AndroidX.Compose.material
83+
implementation Libs.AndroidX.Compose.materialIconsExtended
84+
implementation Libs.AndroidX.Compose.tooling
85+
implementation Libs.AndroidX.Compose.runtime
86+
implementation Libs.AndroidX.Compose.runtimeLivedata
87+
88+
androidTestImplementation Libs.junit
89+
androidTestImplementation Libs.AndroidX.Test.core
90+
androidTestImplementation Libs.AndroidX.Test.espressoCore
91+
androidTestImplementation Libs.AndroidX.Test.rules
92+
androidTestImplementation Libs.AndroidX.Test.Ext.junit
93+
androidTestImplementation Libs.AndroidX.Compose.uiTest
94+
}

JetChat/app/src/androidTest/java/com/example/compose/jetchat/ConversationTest.kt renamed to Jetchat/app/src/androidTest/java/com/example/compose/jetchat/ConversationTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,

JetChat/app/src/androidTest/java/com/example/compose/jetchat/NavigationTest.kt renamed to Jetchat/app/src/androidTest/java/com/example/compose/jetchat/NavigationTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -29,7 +29,7 @@ import com.example.compose.jetchat.conversation.BackPressedDispatcherAmbient
2929
import com.example.compose.jetchat.conversation.ConversationContent
3030
import com.example.compose.jetchat.data.exampleUiState
3131
import com.example.compose.jetchat.theme.JetchatTheme
32-
import junit.framework.Assert.assertEquals
32+
import org.junit.Assert.assertEquals
3333
import org.junit.Before
3434
import org.junit.Rule
3535
import org.junit.Test

JetChat/app/src/androidTest/java/com/example/compose/jetchat/UserInputTest.kt renamed to Jetchat/app/src/androidTest/java/com/example/compose/jetchat/UserInputTest.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
77
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
8+
* https://www.apache.org/licenses/LICENSE-2.0
99
*
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,7 +25,6 @@ import androidx.ui.test.android.AndroidComposeTestRule
2525
import androidx.ui.test.assertIsDisplayed
2626
import androidx.ui.test.assertIsEnabled
2727
import androidx.ui.test.assertIsNotEnabled
28-
import androidx.ui.test.doSendText
2928
import androidx.ui.test.hasAnyAncestor
3029
import androidx.ui.test.hasInputMethodsSupport
3130
import androidx.ui.test.hasLabel
@@ -34,6 +33,7 @@ import androidx.ui.test.onNodeWithLabel
3433
import androidx.ui.test.onNodeWithSubstring
3534
import androidx.ui.test.onNodeWithText
3635
import androidx.ui.test.performClick
36+
import androidx.ui.test.performTextInput
3737
import com.example.compose.jetchat.conversation.BackPressedDispatcherAmbient
3838
import com.example.compose.jetchat.conversation.ConversationContent
3939
import com.example.compose.jetchat.conversation.KeyboardShownKey
@@ -126,7 +126,7 @@ class UserInputTest {
126126
findSendButton().assertIsNotEnabled()
127127

128128
// Add some text to the input field
129-
findTextInputField().doSendText("Some text")
129+
findTextInputField().performTextInput("Some text")
130130

131131
// The send button should be enabled
132132
findSendButton().assertIsEnabled()

0 commit comments

Comments
 (0)