Skip to content

Commit

Permalink
clean up build script
Browse files Browse the repository at this point in the history
1. setting the jvm target in a more succinct way
2. avoid noisy build due to spotless depending on its own output
diffplug/spotless#870 (comment)
  • Loading branch information
davissuber authored and idanakav committed Oct 26, 2023
1 parent c3e6f51 commit 8327d8b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ subprojects {
apply plugin: 'com.diffplug.spotless'
spotless {
format 'misc', {
target '**/*.md', '**/.gitignore'
target '*.md', '.gitignore'

trimTrailingWhitespace()
endWithNewline()
}
kotlin {
target "**/*.kt"
target "src/**/*.kt"
ktlint(deps.versions.ktlint).userData(['indent_size': '2', 'continuation_indent_size': '2'])
ktfmt(deps.versions.ktfmt)
licenseHeaderFile rootProject.file('config/spotless/copyright.kt')
trimTrailingWhitespace()
endWithNewline()
}
java {
target "**/*.java"
target "src/**/*.java"
googleJavaFormat(deps.versions.gjf)
licenseHeaderFile rootProject.file('config/spotless/copyright.java')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
groovyGradle {
target '**/*.gradle'
target '*.gradle'
trimTrailingWhitespace()
endWithNewline()
}
Expand Down
6 changes: 2 additions & 4 deletions intellij/ast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ intellij {
updateSinceUntilBuild = false
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
kotlin {
jvmToolchain(17)
}

dependencies {
Expand Down
6 changes: 2 additions & 4 deletions intellij/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ intellij {
updateSinceUntilBuild = false
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
kotlin {
jvmToolchain(17)
}

group 'com.uber.motif'
Expand Down

0 comments on commit 8327d8b

Please sign in to comment.