Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style plugin #97

Merged
merged 1 commit into from Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 2 additions & 7 deletions build.gradle.kts
@@ -1,6 +1,5 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jlleitschuh.gradle.ktlint.KtlintExtension
import org.sourcegrade.jagr.script.JagrPublishPlugin

@Suppress("DSL_SCOPE_VIOLATION") // https://youtrack.jetbrains.com/issue/KTIJ-19369
Expand All @@ -10,7 +9,7 @@ plugins {
alias(libs.plugins.kotlin.kapt) apply false
alias(libs.plugins.kotlin.serialization) apply false
alias(libs.plugins.shadow)
id("org.jlleitschuh.gradle.ktlint") version "10.2.1"
alias(libs.plugins.style)
}

dependencies {
Expand Down Expand Up @@ -58,7 +57,7 @@ val projectVersion = file("version").readLines().first()
project.extra["apiVersion"] = projectVersion.replace(".[0-9]+(?=($|-SNAPSHOT))".toRegex(), "")

allprojects {
apply(plugin = "org.jlleitschuh.gradle.ktlint")
apply(plugin = "org.sourcegrade.style")

group = "org.sourcegrade"
version = projectVersion
Expand All @@ -67,10 +66,6 @@ allprojects {
?.takeIf { version.toString().contains("SNAPSHOT") }
?.also { version = version.toString().replace("SNAPSHOT", "RC$it") }

configure<KtlintExtension> {
enableExperimentalRules.set(true)
}

tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
Expand Down
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Expand Up @@ -34,3 +34,4 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-kapt = { id = "org.jetbrains.kotlin.kapt", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
shadow = { id = "com.github.johnrengelman.shadow", version = "7.1.2" }
style = { id = "org.sourcegrade.style", version = "2.1.0" }