Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (68 sloc) 2.15 KB
buildscript {
ext.kotlin_version = '1.3.41'
ext.ktlint_version = '0.34.2'
repositories {
jcenter()
maven { url 'http://repo.spring.io/plugins-release' }
}
dependencies {
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.7'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'kotlin'
apply plugin: 'org.junit.platform.gradle.plugin'
group = 'com.github.ridi'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
jcenter()
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
configurations {
ktlint
}
dependencies {
compileOnly "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
provided "com.pinterest.ktlint:ktlint-core:$ktlint_version"
testCompile "com.pinterest.ktlint:ktlint-test:$ktlint_version"
testCompile 'org.assertj:assertj-core:3.5.2'
testCompile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile('org.jetbrains.spek:spek-junit-platform-engine:1.1.5') {
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect'
}
ktlint "com.pinterest:ktlint:$ktlint_version"
}
task ktlint(type: JavaExec, dependsOn: classes) {
main = 'com.pinterest.ktlint.Main'
// adding compiled classes to the classpath so that ktlint would validate project's sources
// using its own ruleset (in other words to dogfood)
classpath = configurations.ktlint + sourceSets.main.output
args '--debug', 'src/**/*.kt'
}
check.dependsOn ktlint
install {
repositories.mavenInstaller {
pom.project {
licenses {
license {
name 'The MIT License'
url 'https://opensource.org/licenses/MIT'
distribution 'repo'
}
}
}
}
}
You can’t perform that action at this time.