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 ktlint #11

Merged
merged 1 commit into from
Aug 20, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
plugins {
kotlin("jvm") version "1.9.0"
id("org.jlleitschuh.gradle.ktlint") version "11.5.1"
}

repositories{
repositories {
mavenLocal()
mavenCentral()
}

Expand All @@ -11,6 +13,6 @@ dependencies {
implementation(gradleApi())
}

kotlin{
kotlin {
jvmToolchain(JavaLanguageVersion.of(20).asInt())
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class GradleBuild private constructor() {
* Returns build configuration handler of this project.
*/
fun of(project: Project): ConfigurationHandler {

/**
* Build configuration handler that applies configuration to project.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ class CheckstyleConfiguration(

fun build() = CheckstyleConfiguration(this.toolVersion, this.enabledFormats)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ enum class JacocoReportFormat {
};

abstract fun subscribeTo(jacocoReportContainer: JacocoReportsContainer)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ abstract class Dependency(

fun dependencyNotation() = dependencyNotation
}

Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ class DependencyNotation(
private val version: String
) {

override fun toString() = "${group}:${name}:${version}"
}
override fun toString() = "$group:$name:$version"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ private const val CONFIGURATION_NAME = "testImplementation"
class TestImplementation(
group: String,
name: String,
version: String,
version: String
) : Dependency(CONFIGURATION_NAME, DependencyNotation(group, name, version))
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ enum class Version {
};

abstract fun of(version: Int): Plugin<Project>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package co.raccoons.local.gradle.javadoc

class JavadocTag(private val name: String, private val head: String) {

override fun toString() = "${name}:a:${head}:"
}
override fun toString() = "$name:a:$head:"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package co.raccoons.local.gradle.repository
import org.gradle.api.Plugin
import org.gradle.api.Project

enum class Repository: Plugin<Project> {
enum class Repository : Plugin<Project> {

MAVEN_CENTRAL {
override fun apply(project: Project) {
Expand All @@ -16,4 +16,4 @@ enum class Repository: Plugin<Project> {
project.repositories.mavenLocal()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ class TestNG(private val dependencyScope: DependencyScope) : Plugin<Project> {

fun build() = TestNG(this.dependencyScope)
}
}
}