Skip to content

Commit 73271a5

Browse files
committed
Run spotless in configuration cache compliant manner
1 parent d3139d5 commit 73271a5

File tree

86 files changed

+602
-493
lines changed

Some content is hidden

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

86 files changed

+602
-493
lines changed

.github/workflows/blueprints.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: ./gradlew assembleDebug compileDebugUnitTestKotlin
4040

4141
- name: Spotless
42-
run: ./gradlew spotlessCheck
42+
run: ./gradlew spotlessCheck --init-script gradle/init.gradle.kts --no-configuration-cache
4343

4444
- name: Robolectric
4545
run: ./gradlew testDebugUnitTest

app/build.gradle.kts

+1-10
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-
* https://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,
@@ -19,7 +19,6 @@ plugins {
1919
alias(libs.plugins.kotlin.android)
2020
alias(libs.plugins.kapt)
2121
alias(libs.plugins.hilt)
22-
alias(libs.plugins.spotless)
2322
}
2423

2524
android {
@@ -212,11 +211,3 @@ dependencies {
212211
androidTestImplementation(libs.hilt.android.testing)
213212
kaptAndroidTest(libs.hilt.compiler)
214213
}
215-
216-
spotless {
217-
kotlin {
218-
target("**/*.kt")
219-
targetExclude(".idea/")
220-
ktlint(libs.versions.ktLint.get())
221-
}
222-
}

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/CustomTestRunner.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/AppNavigationTest.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.example.android.architecture.blueprints.todoapp.tasks
1718

1819
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
@@ -35,12 +36,12 @@ import com.example.android.architecture.blueprints.todoapp.util.saveTaskBlocking
3536
import com.google.accompanist.appcompattheme.AppCompatTheme
3637
import dagger.hilt.android.testing.HiltAndroidRule
3738
import dagger.hilt.android.testing.HiltAndroidTest
39+
import javax.inject.Inject
3840
import org.junit.Assert.assertTrue
3941
import org.junit.Before
4042
import org.junit.Rule
4143
import org.junit.Test
4244
import org.junit.runner.RunWith
43-
import javax.inject.Inject
4445

4546
/**
4647
* Tests for scenarios that requires navigating within the app.

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksScreenTest.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
@@ -35,11 +35,11 @@ import com.example.android.architecture.blueprints.todoapp.util.saveTaskBlocking
3535
import com.google.accompanist.appcompattheme.AppCompatTheme
3636
import dagger.hilt.android.testing.HiltAndroidRule
3737
import dagger.hilt.android.testing.HiltAndroidTest
38+
import javax.inject.Inject
3839
import org.junit.Before
3940
import org.junit.Rule
4041
import org.junit.Test
4142
import org.junit.runner.RunWith
42-
import javax.inject.Inject
4343

4444
/**
4545
* Integration test for the Task List screen.

app/src/androidTest/java/com/example/android/architecture/blueprints/todoapp/tasks/TasksTest.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.example.android.architecture.blueprints.todoapp.tasks
1718

1819
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
@@ -40,11 +41,11 @@ import com.example.android.architecture.blueprints.todoapp.util.saveTaskBlocking
4041
import com.google.accompanist.appcompattheme.AppCompatTheme
4142
import dagger.hilt.android.testing.HiltAndroidRule
4243
import dagger.hilt.android.testing.HiltAndroidTest
44+
import javax.inject.Inject
4345
import org.junit.Before
4446
import org.junit.Rule
4547
import org.junit.Test
4648
import org.junit.runner.RunWith
47-
import javax.inject.Inject
4849

4950
/**
5051
* Large End-to-End test for the tasks module.

app/src/debug/AndroidManifest.xml

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright (C) 2022 The Android Open Source Project
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
3+
Copyright 2022 The Android Open Source Project
174
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
1817
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1918
package="com.example.android.architecture.blueprints.todoapp">
2019

app/src/debug/java/com/example/android/architecture/blueprints/todoapp/HiltTestActivity.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/main/AndroidManifest.xml

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright (C) 2019 The Android Open Source Project
4-
~
5-
~ Licensed under the Apache License, Version 2.0 (the "License");
6-
~ you may not use this file except in compliance with the License.
7-
~ You may obtain a copy of the License at
8-
~
9-
~ http://www.apache.org/licenses/LICENSE-2.0
10-
~
11-
~ Unless required by applicable law or agreed to in writing, software
12-
~ distributed under the License is distributed on an "AS IS" BASIS,
13-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
~ See the License for the specific language governing permissions and
15-
~ limitations under the License.
16-
-->
3+
Copyright 2019 The Android Open Source Project
174
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
1817
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
1918
package="com.example.android.architecture.blueprints.todoapp">
2019

app/src/main/java/com/example/android/architecture/blueprints/todoapp/TasksActivity.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright (C) 2019 The Android Open Source Project
2+
* Copyright 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.example.android.architecture.blueprints.todoapp
1718

1819
import android.os.Bundle

app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoApplication.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2019 The Android Open Source Project
2+
* Copyright 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavGraph.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/main/java/com/example/android/architecture/blueprints/todoapp/TodoNavigation.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/main/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskScreen.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright (C) 2022 The Android Open Source Project
2+
* Copyright 2022 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.example.android.architecture.blueprints.todoapp.addedittask
1718

1819
import androidx.annotation.StringRes

app/src/main/java/com/example/android/architecture/blueprints/todoapp/addedittask/AddEditTaskViewModel.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2019 The Android Open Source Project
2+
* Copyright 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,12 +25,12 @@ import com.example.android.architecture.blueprints.todoapp.data.Result.Success
2525
import com.example.android.architecture.blueprints.todoapp.data.Task
2626
import com.example.android.architecture.blueprints.todoapp.data.source.TasksRepository
2727
import dagger.hilt.android.lifecycle.HiltViewModel
28+
import javax.inject.Inject
2829
import kotlinx.coroutines.flow.MutableStateFlow
2930
import kotlinx.coroutines.flow.StateFlow
3031
import kotlinx.coroutines.flow.asStateFlow
3132
import kotlinx.coroutines.flow.update
3233
import kotlinx.coroutines.launch
33-
import javax.inject.Inject
3434

3535
/**
3636
* UiState for the Add/Edit screen

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/Result.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*
2-
* Copyright (C) 2019 The Android Open Source Project
2+
* Copyright 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,

app/src/main/java/com/example/android/architecture/blueprints/todoapp/data/Task.kt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
/*
2-
* Copyright (C) 2019 The Android Open Source Project
2+
* Copyright 2019 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
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,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
package com.example.android.architecture.blueprints.todoapp.data
1718

1819
import androidx.room.ColumnInfo

0 commit comments

Comments
 (0)