mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Update dependencies, gradle, and add a .editorconfig
This commit is contained in:
44
.editorconfig
Normal file
44
.editorconfig
Normal file
@@ -0,0 +1,44 @@
|
||||
# https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{java,kt,kts,scala,rs,xml,kt.spec,kts.spec}]
|
||||
indent_size = 4
|
||||
|
||||
[*.{kt,kts}]
|
||||
ktlint_code_style = ktlint_official
|
||||
ktlint_ignore_back_ticked_identifier = true
|
||||
|
||||
ktlint_standard = enabled
|
||||
|
||||
# Experimental rules run by default run on the ktlint code base itself. Experimental rules should not be released if
|
||||
# we are not pleased ourselves with the results on the ktlint code base.
|
||||
ktlint_experimental = enabled
|
||||
|
||||
# Trailing comma
|
||||
ij_kotlin_allow_trailing_comma=true
|
||||
ij_kotlin_allow_trailing_comma_on_call_site=true
|
||||
|
||||
# Don't allow any wildcard imports
|
||||
ij_kotlin_packages_to_use_import_on_demand = unset
|
||||
ij_kotlin_name_count_to_use_star_import = 2147483647
|
||||
ij_kotlin_name_count_to_use_star_import_for_members = 2147483647
|
||||
|
||||
ktlint_standard_filename = disabled
|
||||
ktlint_standard_argument-list-wrapping = disabled
|
||||
ktlint_standard_trailing-comma-on-call-site = disabled
|
||||
ktlint_standard_trailing-comma-on-declaration-site = disabled
|
||||
ktlint_experimental_comment-wrapping = disabled
|
||||
ktlint_experimental_function-naming = disabled
|
||||
ktlint_experimental_property-naming = disabled
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
@@ -127,4 +127,10 @@ android {
|
||||
"META-INF/*.version",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain {
|
||||
languageVersion.set(JavaLanguageVersion.of(Config.androidJvmTarget.majorVersion))
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ plugins {
|
||||
alias(libs.plugins.ktorfit) apply false
|
||||
alias(libs.plugins.aboutLibraries) apply false
|
||||
alias(libs.plugins.versions)
|
||||
id("com.louiscad.complete-kotlin") version "1.1.0"
|
||||
}
|
||||
|
||||
allprojects {
|
||||
@@ -46,6 +47,9 @@ tasks.withType<com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
||||
subprojects {
|
||||
tasks.withType<KotlinJvmCompile> {
|
||||
kotlinOptions {
|
||||
if (name.contains("android", true)) {
|
||||
jvmTarget = Config.androidJvmTarget.toString()
|
||||
}
|
||||
if (project.hasProperty("generateComposeCompilerMetrics")) {
|
||||
freeCompilerArgs = freeCompilerArgs + listOf(
|
||||
"-P",
|
||||
@@ -120,17 +124,6 @@ subprojects {
|
||||
}
|
||||
}
|
||||
}
|
||||
plugins.withType<org.jmailen.gradle.kotlinter.KotlinterPlugin> {
|
||||
configure<org.jmailen.gradle.kotlinter.KotlinterExtension> {
|
||||
experimentalRules = true
|
||||
disabledRules = arrayOf(
|
||||
"filename",
|
||||
"experimental:argument-list-wrapping",
|
||||
"experimental:trailing-comma",
|
||||
"experimental:comment-wrapping"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withType<com.google.devtools.ksp.gradle.KspGradleSubplugin> {
|
||||
configure<com.google.devtools.ksp.gradle.KspExtension> {
|
||||
@@ -141,6 +134,13 @@ subprojects {
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withType<de.jensklingenberg.ktorfit.gradle.KtorfitGradleSubPlugin> {
|
||||
configure<de.jensklingenberg.ktorfit.gradle.KtorfitGradleConfiguration> {
|
||||
version = libs.versions.ktorfit.get()
|
||||
logging = project.hasProperty("debugApp")
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withType<JacocoPlugin> {
|
||||
configure<JacocoPluginExtension> {
|
||||
toolVersion = "0.8.7"
|
||||
|
||||
@@ -121,6 +121,8 @@ tasks {
|
||||
}
|
||||
|
||||
registerTachideskTasks(project)
|
||||
|
||||
getByName("formatKotlinMain").dependsOn("kspKotlin")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
[versions]
|
||||
# Kotlin
|
||||
kotlin = "1.8.0"
|
||||
kotlin = "1.8.10"
|
||||
coroutines = "1.6.4"
|
||||
|
||||
# Serialization
|
||||
json = "1.4.1"
|
||||
json = "1.5.0"
|
||||
|
||||
# Compose
|
||||
composeGradle = "1.3.0"
|
||||
composeCompiler = "1.4.0"
|
||||
composeGradle = "1.3.1"
|
||||
composeCompiler = "1.4.2"
|
||||
composeAndroidRuntime = "1.3.3"
|
||||
composeAndroidFoundation = "1.3.1"
|
||||
composeAndroidUI = "1.3.3"
|
||||
@@ -23,32 +23,33 @@ imageloader = "1.2.8"
|
||||
materialDialogs = "0.9.2"
|
||||
|
||||
# Android
|
||||
androidGradle = "7.4.1"
|
||||
androidGradle = "7.4.2"
|
||||
core = "1.9.0"
|
||||
appCompat = "1.7.0-alpha02"
|
||||
activityCompose = "1.6.1"
|
||||
work = "2.8.0"
|
||||
activityCompose = "1.7.0"
|
||||
work = "2.8.1"
|
||||
|
||||
# Android Lifecycle
|
||||
lifecycle = "2.6.0-beta01"
|
||||
lifecycle = "2.6.1"
|
||||
|
||||
# Swing
|
||||
darklaf = "3.0.2"
|
||||
|
||||
# Ksp
|
||||
ksp = "1.8.0-1.0.9"
|
||||
ksp = "1.8.10-1.0.9"
|
||||
|
||||
# Dependency Injection
|
||||
kotlinInject = "0.6.1"
|
||||
|
||||
# Network
|
||||
ktor = "2.2.3"
|
||||
ktorfit = "1.0.0-beta18"
|
||||
ktor = "2.2.4"
|
||||
ktorfit = "1.0.1"
|
||||
ktorfitCompiler = "1.0.0"
|
||||
|
||||
# Logging
|
||||
slf4j = "2.0.6"
|
||||
log4j = "2.19.0"
|
||||
kmlogging = "1.2.1"
|
||||
slf4j = "2.0.7"
|
||||
log4j = "2.20.0"
|
||||
kmlogging = "1.3.0"
|
||||
|
||||
# Storage
|
||||
okio = "3.3.0"
|
||||
@@ -59,23 +60,23 @@ multiplatformSettings = "1.0.0-alpha01"
|
||||
|
||||
# Utility
|
||||
desugarJdkLibs = "2.0.2"
|
||||
aboutLibraries = "10.6.0"
|
||||
aboutLibraries = "10.6.1"
|
||||
dateTime = "0.4.0"
|
||||
immutableCollections = "0.3.5"
|
||||
kds = "3.4.0"
|
||||
|
||||
# Localization
|
||||
moko = "0.20.1"
|
||||
moko = "0.21.1"
|
||||
|
||||
# BuildConfigs
|
||||
buildconfig = "3.1.0"
|
||||
buildkonfig = "0.13.3"
|
||||
|
||||
# Linter
|
||||
kotlinter = "3.13.0"
|
||||
kotlinter = "3.14.0"
|
||||
|
||||
# Version updates
|
||||
versions = "0.45.0"
|
||||
versions = "0.46.0"
|
||||
|
||||
# Optimizer
|
||||
proguard = "7.2.2"
|
||||
@@ -177,39 +178,39 @@ proguard = { module = "com.guardsquare:proguard-gradle", version.ref = "proguard
|
||||
|
||||
[plugins]
|
||||
# Kotlin
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin"}
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin"}
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin"}
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin"}
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
|
||||
# Android
|
||||
android-library = { id = "com.android.library", version.ref = "androidGradle"}
|
||||
android-application = { id = "com.android.application", version.ref = "androidGradle"}
|
||||
android-library = { id = "com.android.library", version.ref = "androidGradle" }
|
||||
android-application = { id = "com.android.application", version.ref = "androidGradle" }
|
||||
|
||||
# Compose
|
||||
compose = { id = "org.jetbrains.compose", version.ref = "composeGradle"}
|
||||
compose = { id = "org.jetbrains.compose", version.ref = "composeGradle" }
|
||||
|
||||
# Ksp
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp"}
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
|
||||
# Network
|
||||
ktorfit = { id = "de.jensklingenberg.ktorfit", version = "1.0.0"}
|
||||
ktorfit = { id = "de.jensklingenberg.ktorfit", version.ref = "ktorfitCompiler" }
|
||||
|
||||
# Localization
|
||||
moko-gradle = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko"}
|
||||
moko-gradle = { id = "dev.icerock.mobile.multiplatform-resources", version.ref = "moko" }
|
||||
|
||||
# BuildConfigs
|
||||
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig"}
|
||||
buildkonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildkonfig"}
|
||||
buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }
|
||||
buildkonfig = { id = "com.codingfeline.buildkonfig", version.ref = "buildkonfig" }
|
||||
|
||||
# Linter
|
||||
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter"}
|
||||
kotlinter = { id = "org.jmailen.kotlinter", version.ref = "kotlinter" }
|
||||
|
||||
# Version updates
|
||||
versions = { id = "com.github.ben-manes.versions", version.ref = "versions"}
|
||||
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
|
||||
|
||||
# Utility
|
||||
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries"}
|
||||
aboutLibraries = { id = "com.mikepenz.aboutlibraries.plugin", version.ref = "aboutLibraries" }
|
||||
|
||||
[bundles]
|
||||
compose-android = [
|
||||
|
||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
6
gradlew
vendored
6
gradlew
vendored
@@ -205,6 +205,12 @@ set -- \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# 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.
|
||||
|
||||
14
gradlew.bat
vendored
14
gradlew.bat
vendored
@@ -14,7 +14,7 @@
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@@ -25,7 +25,7 @@
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
@@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
if %ERRORLEVEL% equ 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
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
@@ -49,6 +49,9 @@ kotlin {
|
||||
|
||||
tasks {
|
||||
registerLocalizationTask(project)
|
||||
|
||||
getByName("desktopProcessResources")
|
||||
.dependsOn("generateMRcommonMain", "generateMRdesktopMain")
|
||||
}
|
||||
|
||||
multiplatformResources {
|
||||
|
||||
@@ -26,5 +26,4 @@ include("android")
|
||||
include("desktop")
|
||||
include("ios")
|
||||
|
||||
enableFeaturePreview("VERSION_CATALOGS")
|
||||
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
|
||||
|
||||
Reference in New Issue
Block a user