diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 362ad066bb..5259989892 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -211,6 +211,10 @@ src/// 13 directories, 9 files ``` +`` should be an ISO 639-1 compliant language code (two letters or `all`). `` +should be adapted from the site name, and can only contain lowercase ASCII letters and digits. +Your extension code must be placed in the package `eu.kanade.tachiyomi.animeextension..`. + #### AndroidManifest.xml A minimal [Android manifest file](https://developer.android.com/guide/topics/manifest/manifest-intro) is needed for Android to recognize a extension when it's compiled into an APK file. You can also add intent filters inside this file (see [URL intent filter](#url-intent-filter) for more information). @@ -218,12 +222,8 @@ A minimal [Android manifest file](https://developer.android.com/guide/topics/man Make sure that your new extension's `build.gradle` file follows the following structure: ```gradle -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - ext { extName = '' - pkgNameSuffix = '.' extClass = '.' extVersionCode = 1 containsNsfw = true @@ -234,8 +234,7 @@ apply from: "$rootDir/common.gradle" | Field | Description | | ----- | ----------- | -| `extName` | The name of the extension. | -| `pkgNameSuffix` | A unique suffix added to `eu.kanade.tachiyomi.animeextension`. The language and the site name should be enough. Remember your extension code implementation must be placed in this package. | +| `extName` | The name of the extension. Should be romanized if site name is not in English.| | `extClass` | Points to the class that implements `AnimeSource`. You can use a relative path starting with a dot (the package name is the base path). This is used to find and instantiate the source(s). | | `extVersionCode` | The extension version code. This must be a positive integer and incremented with any change to the code. | | `libVersion` | (Optional, defaults to `14`) The version of the [extensions library](https://github.com/aniyomiorg/extensions-lib) used. | @@ -408,7 +407,7 @@ open class UriPartFilter(displayName: String, private val vals: Array file.name.equals("README.md") || diff --git a/gradle.properties b/gradle.properties index 08688f6bd8..022f4950c1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,3 +21,5 @@ org.gradle.caching=true # Enable AndroidX dependencies android.useAndroidX=true +android.nonTransitiveRClass=false +android.nonFinalResIds=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c825b2d0d8..ed0e8fa970 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp_version = "8.0.2" +agp_version = "8.2.1" coroutines_version = "1.7.1" kotlin_version = "1.8.22" serialization_version = "1.5.1" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index c1962a79e2..d64cd49177 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 37aef8d3f0..1af9e0930b 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index aeb74cbb43..1aa94a4269 100755 --- a/gradlew +++ b/gradlew @@ -83,7 +83,8 @@ done # This is normally unused # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -130,10 +131,13 @@ 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. @@ -141,7 +145,7 @@ 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=SC3045 + # shellcheck disable=SC2039,SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac @@ -149,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then '' | soft) :;; #( *) # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 + # shellcheck disable=SC2039,SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,11 +202,11 @@ fi # 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 $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. +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_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" \ diff --git a/multisrc/overrides/datalifeengine/frenchanime/src/FrenchAnime.kt b/multisrc/overrides/datalifeengine/frenchanime/src/FrenchAnime.kt index 59f3b0c32e..6e7e2c5b3a 100644 --- a/multisrc/overrides/datalifeengine/frenchanime/src/FrenchAnime.kt +++ b/multisrc/overrides/datalifeengine/frenchanime/src/FrenchAnime.kt @@ -20,7 +20,6 @@ import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document import org.jsoup.nodes.Element -import java.lang.Exception class FrenchAnime : DataLifeEngine( "French Anime", @@ -82,9 +81,9 @@ class FrenchAnime : DataLifeEngine( return episodeList.reversed() } - override fun episodeListSelector(): String = throw Exception("not used") + override fun episodeListSelector(): String = throw UnsupportedOperationException() - override fun episodeFromElement(element: Element): SEpisode = throw Exception("not used") + override fun episodeFromElement(element: Element): SEpisode = throw UnsupportedOperationException() // ============================ Video Links ============================= override suspend fun getVideoList(episode: SEpisode): List