diff --git a/.github/workflows/copyright-check.yml b/.github/workflows/copyright-check.yml index eccfd470a56..5461e529253 100644 --- a/.github/workflows/copyright-check.yml +++ b/.github/workflows/copyright-check.yml @@ -21,6 +21,7 @@ jobs: -e py \ -e gradle \ -e java \ + -e kt \ -e groovy \ -e sh \ -e proto diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaGenerationTask.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaGenerationTask.kt index a6a8559d02a..13d0cd2b1b0 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaGenerationTask.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaGenerationTask.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins import java.io.File diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaPlugin.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaPlugin.kt index ddae25f96a3..e0745ccfeb7 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaPlugin.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/DackkaPlugin.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins import com.android.build.api.attributes.BuildTypeAttr diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/FiresiteTransformTask.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/FiresiteTransformTask.kt index 4776fa0bfeb..0a7641c7583 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/FiresiteTransformTask.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/FiresiteTransformTask.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins import java.io.File diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/GradleUtils.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/GradleUtils.kt index f5acde8f743..eb0dad74404 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/GradleUtils.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/GradleUtils.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins import java.io.File diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/KotlinUtils.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/KotlinUtils.kt index 0830af21a91..0045afeef87 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/KotlinUtils.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/KotlinUtils.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins /** Replaces all matching substrings with an empty string (nothing) */ diff --git a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/ChangedModulesTask.kt b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/ChangedModulesTask.kt index 4f6a053c020..11bf08075bd 100644 --- a/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/ChangedModulesTask.kt +++ b/buildSrc/src/main/java/com/google/firebase/gradle/plugins/ci/ChangedModulesTask.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.gradle.plugins.ci import com.google.gson.Gson diff --git a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt index 8165362dacd..5d12271e194 100644 --- a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt +++ b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/MainActivity.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.googletest.firebase.appdistribution.testapp import android.app.AlertDialog diff --git a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt index 7ebc5968e0e..8af6529e3d5 100644 --- a/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt +++ b/firebase-appdistribution/test-app/src/main/java/com/googletest/firebase/appdistribution/testapp/SecondActivity.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.googletest.firebase.appdistribution.testapp import android.content.Intent diff --git a/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/ChildEvent.kt b/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/ChildEvent.kt index 2330b6a0476..95cb8e18ac2 100644 --- a/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/ChildEvent.kt +++ b/firebase-database/ktx/src/main/kotlin/com/google/firebase/database/ktx/ChildEvent.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.database.ktx import com.google.firebase.database.DataSnapshot diff --git a/firebase-storage/ktx/src/main/kotlin/com/google/firebase/storage/ktx/TaskState.kt b/firebase-storage/ktx/src/main/kotlin/com/google/firebase/storage/ktx/TaskState.kt index 4b4f32a67c4..e9a0f8590f6 100644 --- a/firebase-storage/ktx/src/main/kotlin/com/google/firebase/storage/ktx/TaskState.kt +++ b/firebase-storage/ktx/src/main/kotlin/com/google/firebase/storage/ktx/TaskState.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.storage.ktx /** Used to emit events about the progress of storage tasks. */ diff --git a/tools/lint/src/main/kotlin/TasksMainThreadDetector.kt b/tools/lint/src/main/kotlin/TasksMainThreadDetector.kt index e1b0aa11c2e..03810020798 100644 --- a/tools/lint/src/main/kotlin/TasksMainThreadDetector.kt +++ b/tools/lint/src/main/kotlin/TasksMainThreadDetector.kt @@ -1,3 +1,17 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.lint.checks import com.android.tools.lint.detector.api.Category @@ -61,8 +75,9 @@ class TasksMainThreadDetector : Detector(), SourceCodeScanner { briefDescription = "Use an explicit Executor for Task continuations", explanation = """ - Not providing an executor results in continuations to execute on the main thread \ - which is not a good default. Please pass in an executor explicitly. + Not providing an executor results in continuations being executed on the main \ + thread, which in most cases is not intended. Please pass in an executor \ + explicitly. """, category = Category.PERFORMANCE, priority = 6, diff --git a/tools/lint/src/main/kotlin/ThreadPoolDetector.kt b/tools/lint/src/main/kotlin/ThreadPoolDetector.kt index 3be937f886e..f72c0e7c449 100644 --- a/tools/lint/src/main/kotlin/ThreadPoolDetector.kt +++ b/tools/lint/src/main/kotlin/ThreadPoolDetector.kt @@ -1,3 +1,17 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package com.google.firebase.lint.checks import com.android.tools.lint.detector.api.Category