Skip to content

Commit

Permalink
Add style plugin (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstaeding committed Sep 2, 2022
1 parent 8036fb7 commit e07e490
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
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" }

0 comments on commit e07e490

Please sign in to comment.