mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-14 22:42:49 +01:00
Compare commits
2 Commits
4bcba0503a
...
cc09230e26
Author | SHA1 | Date | |
---|---|---|---|
|
cc09230e26 | ||
|
9c4d2b087f |
4
.github/ISSUE_TEMPLATE/report_issue.yml
vendored
4
.github/ISSUE_TEMPLATE/report_issue.yml
vendored
@ -53,7 +53,7 @@ body:
|
|||||||
label: Mihon version
|
label: Mihon version
|
||||||
description: You can find your Mihon version in **More → About**.
|
description: You can find your Mihon version in **More → About**.
|
||||||
placeholder: |
|
placeholder: |
|
||||||
Example: "0.16.1"
|
Example: "0.16.2"
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https://mihon.app/docs/guides/troubleshooting/).
|
- label: I have gone through the [FAQ](https://mihon.app/docs/faq/general) and [troubleshooting guide](https://mihon.app/docs/guides/troubleshooting/).
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated the app to version **[0.16.1](https://github.com/mihonapp/mihon/releases/latest)**.
|
- label: I have updated the app to version **[0.16.2](https://github.com/mihonapp/mihon/releases/latest)**.
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated all installed extensions.
|
- label: I have updated all installed extensions.
|
||||||
required: true
|
required: true
|
||||||
|
2
.github/ISSUE_TEMPLATE/request_feature.yml
vendored
2
.github/ISSUE_TEMPLATE/request_feature.yml
vendored
@ -31,7 +31,7 @@ body:
|
|||||||
required: true
|
required: true
|
||||||
- label: I have written a short but informative title.
|
- label: I have written a short but informative title.
|
||||||
required: true
|
required: true
|
||||||
- label: I have updated the app to version **[0.16.1](https://github.com/mihonapp/mihon/releases/latest)**.
|
- label: I have updated the app to version **[0.16.2](https://github.com/mihonapp/mihon/releases/latest)**.
|
||||||
required: true
|
required: true
|
||||||
- label: I will fill out all of the requested information in this form.
|
- label: I will fill out all of the requested information in this form.
|
||||||
required: true
|
required: true
|
||||||
|
2
.github/workflows/build_pull_request.yml
vendored
2
.github/workflows/build_pull_request.yml
vendored
@ -37,4 +37,4 @@ jobs:
|
|||||||
- name: Build app and run unit tests
|
- name: Build app and run unit tests
|
||||||
uses: gradle/gradle-command-action@v2
|
uses: gradle/gradle-command-action@v2
|
||||||
with:
|
with:
|
||||||
arguments: ktlintCheck assembleStandardRelease testReleaseUnitTest
|
arguments: detekt assembleStandardRelease testReleaseUnitTest
|
||||||
|
2
.github/workflows/build_push.yml
vendored
2
.github/workflows/build_push.yml
vendored
@ -35,7 +35,7 @@ jobs:
|
|||||||
- name: Build app and run unit tests
|
- name: Build app and run unit tests
|
||||||
uses: gradle/gradle-command-action@v2
|
uses: gradle/gradle-command-action@v2
|
||||||
with:
|
with:
|
||||||
arguments: ktlintCheck assembleStandardRelease testReleaseUnitTest
|
arguments: detekt assembleStandardRelease testReleaseUnitTest
|
||||||
|
|
||||||
# Sign APK and create release for tags
|
# Sign APK and create release for tags
|
||||||
|
|
||||||
|
@ -163,7 +163,6 @@ dependencies {
|
|||||||
implementation(compose.ui.util)
|
implementation(compose.ui.util)
|
||||||
implementation(compose.accompanist.webview)
|
implementation(compose.accompanist.webview)
|
||||||
implementation(compose.accompanist.systemuicontroller)
|
implementation(compose.accompanist.systemuicontroller)
|
||||||
lintChecks(compose.lintchecks)
|
|
||||||
|
|
||||||
implementation(androidx.paging.runtime)
|
implementation(androidx.paging.runtime)
|
||||||
implementation(androidx.paging.compose)
|
implementation(androidx.paging.compose)
|
||||||
|
@ -32,8 +32,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins.withType<BasePlugin> {
|
plugins.withType<BasePlugin> {
|
||||||
plugins.apply("tachiyomi.lint")
|
plugins.apply("detekt")
|
||||||
|
|
||||||
configure<BaseExtension> {
|
configure<BaseExtension> {
|
||||||
compileSdkVersion(AndroidConfig.compileSdk)
|
compileSdkVersion(AndroidConfig.compileSdk)
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -3,9 +3,10 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location))
|
||||||
implementation(androidxLibs.gradle)
|
implementation(androidxLibs.gradle)
|
||||||
implementation(kotlinLibs.gradle)
|
implementation(kotlinLibs.gradle)
|
||||||
implementation(libs.ktlint)
|
implementation(libs.detekt.gradlePlugin)
|
||||||
implementation(gradleApi())
|
implementation(gradleApi())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
47
buildSrc/src/main/kotlin/detekt.gradle.kts
Normal file
47
buildSrc/src/main/kotlin/detekt.gradle.kts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import io.gitlab.arturbosch.detekt.Detekt
|
||||||
|
import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask
|
||||||
|
import org.gradle.accessors.dm.LibrariesForLibs
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
id("io.gitlab.arturbosch.detekt")
|
||||||
|
}
|
||||||
|
|
||||||
|
val libs = the<LibrariesForLibs>()
|
||||||
|
dependencies {
|
||||||
|
detektPlugins(libs.detekt.rules.formatting)
|
||||||
|
detektPlugins(libs.detekt.rules.compose)
|
||||||
|
}
|
||||||
|
|
||||||
|
private val configFile = files("$rootDir/config/detekt/detekt.yml")
|
||||||
|
private val baselineFile = file("$rootDir/config/detekt/baseline.xml")
|
||||||
|
private val kotlinFiles = "**/*.kt"
|
||||||
|
private val resourceFiles = "**/resources/**"
|
||||||
|
private val buildFiles = "**/build/**"
|
||||||
|
private val generatedFiles = "**/generated/**"
|
||||||
|
private val scriptsFiles = "**/*.kts"
|
||||||
|
|
||||||
|
detekt {
|
||||||
|
buildUponDefaultConfig = true
|
||||||
|
parallel = true
|
||||||
|
autoCorrect = false
|
||||||
|
ignoreFailures = false
|
||||||
|
config.setFrom(configFile)
|
||||||
|
baseline = file(baselineFile)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Detekt>().configureEach {
|
||||||
|
include(kotlinFiles)
|
||||||
|
exclude(resourceFiles, buildFiles, generatedFiles, scriptsFiles)
|
||||||
|
reports {
|
||||||
|
html.required.set(true)
|
||||||
|
xml.required.set(false)
|
||||||
|
txt.required.set(false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Detekt>().configureEach {
|
||||||
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
||||||
|
}
|
||||||
|
tasks.withType<DetektCreateBaselineTask>().configureEach {
|
||||||
|
jvmTarget = JavaVersion.VERSION_17.toString()
|
||||||
|
}
|
@ -1,22 +0,0 @@
|
|||||||
import org.jlleitschuh.gradle.ktlint.KtlintExtension
|
|
||||||
import org.jlleitschuh.gradle.ktlint.KtlintPlugin
|
|
||||||
|
|
||||||
apply<KtlintPlugin>()
|
|
||||||
|
|
||||||
extensions.configure<KtlintExtension>("ktlint") {
|
|
||||||
version.set("0.50.0")
|
|
||||||
android.set(true)
|
|
||||||
enableExperimentalRules.set(true)
|
|
||||||
|
|
||||||
filter {
|
|
||||||
exclude("**/generated/**")
|
|
||||||
|
|
||||||
// For some reason this is needed for Kotlin MPP
|
|
||||||
exclude { tree ->
|
|
||||||
val path = tree.file.path
|
|
||||||
listOf("/generated/").any {
|
|
||||||
path.contains(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
1327
config/detekt/baseline.xml
Normal file
1327
config/detekt/baseline.xml
Normal file
File diff suppressed because it is too large
Load Diff
19
config/detekt/detekt.yml
Normal file
19
config/detekt/detekt.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
naming:
|
||||||
|
FunctionNaming:
|
||||||
|
functionPattern: '[a-z][a-zA-Z0-9]*'
|
||||||
|
ignoreAnnotated: [ 'Composable' ]
|
||||||
|
TopLevelPropertyNaming:
|
||||||
|
constantPattern: '[A-Z][A-Za-z0-9]*'
|
||||||
|
|
||||||
|
complexity:
|
||||||
|
LongParameterList:
|
||||||
|
functionThreshold: 6
|
||||||
|
constructorThreshold: 7
|
||||||
|
ignoreDefaultParameters: true
|
||||||
|
|
||||||
|
style:
|
||||||
|
MagicNumber:
|
||||||
|
ignorePropertyDeclaration: true
|
||||||
|
ignoreCompanionObjectPropertyDeclaration: true
|
||||||
|
UnusedPrivateMember:
|
||||||
|
ignoreAnnotated: [ 'Preview' ]
|
@ -23,5 +23,3 @@ glance = "androidx.glance:glance-appwidget:1.0.0"
|
|||||||
|
|
||||||
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" }
|
accompanist-webview = { module = "com.google.accompanist:accompanist-webview", version.ref = "accompanist" }
|
||||||
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
|
accompanist-systemuicontroller = { module = "com.google.accompanist:accompanist-systemuicontroller", version.ref = "accompanist" }
|
||||||
|
|
||||||
lintchecks = { module = "com.slack.lint.compose:compose-lint-checks", version = "1.2.0" }
|
|
@ -8,6 +8,8 @@ shizuku_version = "12.2.0"
|
|||||||
sqldelight = "2.0.0"
|
sqldelight = "2.0.0"
|
||||||
sqlite = "2.4.0"
|
sqlite = "2.4.0"
|
||||||
voyager = "1.0.0"
|
voyager = "1.0.0"
|
||||||
|
detekt = "1.23.1"
|
||||||
|
detektCompose = "0.3.11"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
|
desugar = "com.android.tools:desugar_jdk_libs:2.0.4"
|
||||||
@ -93,7 +95,9 @@ voyager-screenmodel = { module = "cafe.adriel.voyager:voyager-screenmodel", vers
|
|||||||
voyager-tab-navigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager" }
|
voyager-tab-navigator = { module = "cafe.adriel.voyager:voyager-tab-navigator", version.ref = "voyager" }
|
||||||
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
|
voyager-transitions = { module = "cafe.adriel.voyager:voyager-transitions", version.ref = "voyager" }
|
||||||
|
|
||||||
ktlint = "org.jlleitschuh.gradle:ktlint-gradle:12.0.3"
|
detekt-gradlePlugin = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
|
||||||
|
detekt-rules-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
|
||||||
|
detekt-rules-compose = { module = "io.nlopez.compose.rules:detekt", version.ref = "detektCompose" }
|
||||||
|
|
||||||
[bundles]
|
[bundles]
|
||||||
okhttp = ["okhttp-core", "okhttp-logging", "okhttp-brotli", "okhttp-dnsoverhttps"]
|
okhttp = ["okhttp-core", "okhttp-logging", "okhttp-brotli", "okhttp-dnsoverhttps"]
|
||||||
|
@ -36,7 +36,6 @@ dependencies {
|
|||||||
debugImplementation(compose.ui.tooling)
|
debugImplementation(compose.ui.tooling)
|
||||||
implementation(compose.ui.tooling.preview)
|
implementation(compose.ui.tooling.preview)
|
||||||
implementation(compose.ui.util)
|
implementation(compose.ui.util)
|
||||||
lintChecks(compose.lintchecks)
|
|
||||||
|
|
||||||
implementation(kotlinx.immutables)
|
implementation(kotlinx.immutables)
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@ dependencies {
|
|||||||
api(projects.i18n)
|
api(projects.i18n)
|
||||||
|
|
||||||
implementation(compose.glance)
|
implementation(compose.glance)
|
||||||
lintChecks(compose.lintchecks)
|
|
||||||
|
|
||||||
implementation(kotlinx.immutables)
|
implementation(kotlinx.immutables)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user