Replace OSS licenses plugin with Licensee and some manually done UI.

This should fix both configuration cache and reproducible F-droid builds.

Cleanup and remove gplay/fdroid diff on open source licenses.

Co-authored by @jmartinesp
This commit is contained in:
Benoit Marty 2024-09-02 20:02:06 +02:00 committed by Benoit Marty
parent 9c21a96d3d
commit b9169e6c76
38 changed files with 983 additions and 309 deletions

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2024 New Vector Ltd
*
* 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
*
* https://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 extension
import java.io.File
import org.gradle.api.DefaultTask
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
@CacheableTask
abstract class AssetCopyTask : DefaultTask() {
@get:OutputDirectory
abstract val outputDirectory: DirectoryProperty
@get:PathSensitive(PathSensitivity.RELATIVE)
@get:InputFile
abstract val inputFile: RegularFileProperty
@get:Input
abstract val targetFileName: Property<String>
@TaskAction
fun action() {
println("Copying ${inputFile.get()} to ${outputDirectory.get().asFile}/${targetFileName.get()}")
inputFile.get().asFile.copyTo(
target = File(
outputDirectory.get().asFile,
targetFileName.get(),
),
overwrite = true,
)
}
}