diff --git a/build.gradle.kts b/build.gradle.kts index 88c27053..9a85c9d4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - kotlin("jvm") version "2.0.0" + kotlin("jvm") version "2.3.21" id("java-gradle-plugin") id("maven-publish") } @@ -39,13 +39,13 @@ dependencies { implementation(kotlin("stdlib", kotlin.coreLibrariesVersion)) compileOnly(gradleApi()) - compileOnly("com.google.guava:guava:30.1.1-jre") - compileOnly("com.android.tools:sdk-common:30.0.0") - compileOnly("com.android.tools.build:gradle:8.7.3") - compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.0") + compileOnly("com.google.guava:guava:33.6.0-jre") + compileOnly("com.android.tools:sdk-common:32.1.1") + compileOnly("com.android.tools.build:gradle:9.1.1") + compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.21") - implementation("org.ow2.asm:asm:9.4") - implementation("org.ow2.asm:asm-tree:9.4") + implementation("org.ow2.asm:asm:9.9.1") + implementation("org.ow2.asm:asm-tree:9.9.1") implementation("com.github.vidstige:jadb:v1.2.1") } diff --git a/gradle.properties b/gradle.properties index a5158152..0f8d9e25 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,5 @@ kotlin.code.style=official -version=local-SNAPSHOT \ No newline at end of file +version=local-SNAPSHOT + +org.gradle.caching=true +org.gradle.configuration-cache=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180f..b1b8ef56 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 19cfad96..4b271a64 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,10 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +distributionSha256Sum=553c78f50dafcd54d65b9a444649057857469edf836431389695608536d6b746 +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.0-bin.zip +networkTimeout=10000 +retries=0 +retryBackOffMs=500 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c7873..b9bb139f 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,13 +82,11 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -114,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -133,22 +132,29 @@ location of your Java installation." fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -165,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -193,18 +198,27 @@ if "$cygwin" || "$msys" ; then done fi -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 107acd32..aa5f10b0 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,89 +1,82 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +"%COMSPEC%" /c exit 1 + +:execute +@rem Setup the command line + + + +@rem Execute Gradle +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel + +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/jitpack.yml b/jitpack.yml index 46c85291..1e41e00b 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,2 +1,2 @@ jdk: - - openjdk11 \ No newline at end of file + - openjdk17 \ No newline at end of file diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/LibraryExtensionCompat.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/LibraryExtensionCompat.kt index 613287ab..924bd2e6 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/LibraryExtensionCompat.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/LibraryExtensionCompat.kt @@ -1,3 +1,6 @@ +// BaseExtension is deprecated and will be removed in AGP 10.0 +@file:Suppress("DEPRECATION") + package com.lagradost.cloudstream3.gradle import com.android.build.api.dsl.LibraryExtension diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CleanCacheTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CleanCacheTask.kt index 11f430bd..f0b56d4a 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CleanCacheTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CleanCacheTask.kt @@ -2,9 +2,11 @@ package com.lagradost.cloudstream3.gradle.tasks import org.gradle.api.DefaultTask import org.gradle.api.file.RegularFileProperty +import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.Internal import org.gradle.api.tasks.TaskAction +@CacheableTask abstract class CleanCacheTask : DefaultTask() { @get:Internal abstract val jarFile: RegularFileProperty diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt index bef129eb..d0d0e421 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileDexTask.kt @@ -11,11 +11,14 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property +import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.IgnoreEmptyDirectories import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.SkipWhenEmpty -import org.gradle.api.tasks.IgnoreEmptyDirectories import org.gradle.api.tasks.TaskAction import org.objectweb.asm.ClassReader import org.objectweb.asm.tree.ClassNode @@ -25,11 +28,13 @@ import java.nio.file.Path import java.util.Arrays import java.util.stream.Collectors +@CacheableTask abstract class CompileDexTask : DefaultTask() { @InputFiles @SkipWhenEmpty @IgnoreEmptyDirectories + @get:PathSensitive(PathSensitivity.RELATIVE) val input: ConfigurableFileCollection = project.objects.fileCollection() @get:OutputFile @@ -42,6 +47,7 @@ abstract class CompileDexTask : DefaultTask() { abstract val minSdk: Property @get:InputFiles + @get:PathSensitive(PathSensitivity.NONE) abstract val bootClasspath: ConfigurableFileCollection @TaskAction diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompilePluginJarTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompilePluginJarTask.kt index 6c4fe954..4e18a759 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompilePluginJarTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompilePluginJarTask.kt @@ -3,20 +3,26 @@ package com.lagradost.cloudstream3.gradle.tasks import org.gradle.api.DefaultTask 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.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.TaskAction +@CacheableTask abstract class CompilePluginJarTask : DefaultTask() { @get:Input abstract val hasCrossPlatformSupport: Property @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) abstract val pluginClassFile: RegularFileProperty @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) abstract val jarInputFile: RegularFileProperty @get:OutputFile diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileResourcesTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileResourcesTask.kt index 6497a51a..4d5ef31f 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileResourcesTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/CompileResourcesTask.kt @@ -2,31 +2,39 @@ package com.lagradost.cloudstream3.gradle.tasks import org.gradle.api.file.DirectoryProperty import org.gradle.api.file.RegularFileProperty +import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.Exec import org.gradle.api.tasks.IgnoreEmptyDirectories import org.gradle.api.tasks.InputDirectory import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.SkipWhenEmpty import java.io.File +@CacheableTask abstract class CompileResourcesTask : Exec() { @get:InputDirectory @get:SkipWhenEmpty @get:IgnoreEmptyDirectories + @get:PathSensitive(PathSensitivity.RELATIVE) abstract val input: DirectoryProperty @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) abstract val manifestFile: RegularFileProperty @get:OutputFile abstract val outputFile: RegularFileProperty @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) abstract val aaptExecutable: RegularFileProperty @get:InputFile + @get:PathSensitive(PathSensitivity.NAME_ONLY) abstract val androidJar: RegularFileProperty override fun exec() { diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt index 81c357a6..cb92f259 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/DeployWithAdbTask.kt @@ -3,8 +3,11 @@ package com.lagradost.cloudstream3.gradle.tasks import org.gradle.api.DefaultTask 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.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.options.Option import se.vidstige.jadb.AdbServerLauncher @@ -16,6 +19,7 @@ import se.vidstige.jadb.Subprocess import java.io.File import java.nio.charset.StandardCharsets +@CacheableTask abstract class DeployWithAdbTask : DefaultTask() { @get:Input @@ -23,7 +27,9 @@ abstract class DeployWithAdbTask : DefaultTask() { var waitForDebugger: Boolean = false @get:Input abstract val adbPath: Property - @get:InputFile abstract val pluginFile: RegularFileProperty + @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) + abstract val pluginFile: RegularFileProperty @TaskAction fun deployWithAdb() { diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/EnsureJarCompatibilityTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/EnsureJarCompatibilityTask.kt index 6177f40f..7ce3c9d4 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/EnsureJarCompatibilityTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/EnsureJarCompatibilityTask.kt @@ -1,18 +1,23 @@ package com.lagradost.cloudstream3.gradle.tasks +import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.Exec import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.Optional import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.provider.Property import org.gradle.api.file.RegularFileProperty import org.gradle.api.GradleException +@CacheableTask abstract class EnsureJarCompatibilityTask : Exec() { @get:InputFile @get:Optional + @get:PathSensitive(PathSensitivity.NONE) abstract val jarFile: RegularFileProperty @get:Input diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateManifestTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateManifestTask.kt index 6bc5bb88..083ddf8d 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateManifestTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateManifestTask.kt @@ -6,16 +6,21 @@ import groovy.json.JsonGenerator import org.gradle.api.DefaultTask 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.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.SkipWhenEmpty import org.gradle.api.tasks.TaskAction +@CacheableTask abstract class GenerateManifestTask : DefaultTask() { @get:InputFile @get:SkipWhenEmpty + @get:PathSensitive(PathSensitivity.NONE) abstract val pluginClassFile: RegularFileProperty @get:Input diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateSourcesTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateSourcesTask.kt index a24e5f25..98492312 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateSourcesTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/GenerateSourcesTask.kt @@ -4,6 +4,7 @@ import com.lagradost.cloudstream3.gradle.download import org.gradle.api.DefaultTask 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.OutputFile import org.gradle.api.tasks.TaskAction @@ -11,6 +12,7 @@ import org.gradle.internal.logging.progress.ProgressLoggerFactory import java.net.URI import javax.inject.Inject +@CacheableTask abstract class GenerateSourcesTask : DefaultTask() { @get:Inject diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt index d77f8613..c7279c81 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/MakePluginsJsonTask.kt @@ -5,6 +5,7 @@ import groovy.json.JsonSlurper import org.gradle.api.DefaultTask import org.gradle.api.file.ConfigurableFileCollection import org.gradle.api.file.RegularFileProperty +import org.gradle.api.tasks.CacheableTask import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.PathSensitive @@ -12,6 +13,7 @@ import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.SkipWhenEmpty import org.gradle.api.tasks.TaskAction +@CacheableTask abstract class MakePluginsJsonTask : DefaultTask() { @get:OutputFile diff --git a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/WriteCacheEntryTask.kt b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/WriteCacheEntryTask.kt index 3bbf1fdf..18d308de 100644 --- a/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/WriteCacheEntryTask.kt +++ b/src/main/kotlin/com/lagradost/cloudstream3/gradle/tasks/WriteCacheEntryTask.kt @@ -7,14 +7,18 @@ import org.gradle.api.DefaultTask import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.ListProperty 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.Optional import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.PathSensitive +import org.gradle.api.tasks.PathSensitivity import org.gradle.api.tasks.TaskAction import java.io.File import java.security.MessageDigest +@CacheableTask abstract class WriteCacheEntryTask : DefaultTask() { @get:Input abstract val pluginName: Property @@ -30,8 +34,14 @@ abstract class WriteCacheEntryTask : DefaultTask() { @get:Input abstract val apiVersion: Property @get:Input @get:Optional abstract val tvTypes: ListProperty - @get:InputFile abstract val cs3File: RegularFileProperty - @get:InputFile @get:Optional abstract val jarFile: RegularFileProperty + @get:InputFile + @get:PathSensitive(PathSensitivity.NONE) + abstract val cs3File: RegularFileProperty + + @get:InputFile + @get:Optional + @get:PathSensitive(PathSensitivity.NONE) + abstract val jarFile: RegularFileProperty @get:OutputFile abstract val outputFile: RegularFileProperty