Skip to content

Commit

Permalink
build: pull build scripts from shared repo
Browse files Browse the repository at this point in the history
  • Loading branch information
antonydenyer committed Nov 15, 2019
1 parent 0ece196 commit 2b22462
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ plugins {
id "idea"
id "jacoco"
id "com.github.johnrengelman.shadow" version "5.1.0"
id "com.diffplug.gradle.spotless" version "3.24.3"
id "com.diffplug.gradle.spotless" version "3.25.0"
id "de.undercouch.download" version "4.0.0"
}

description 'web3j command line tools'
Expand All @@ -27,7 +28,7 @@ apply {
'javadoc',
'repositories',
'spotless'
].each {
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
Expand Down
17 changes: 17 additions & 0 deletions gradle/spotless/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@

apply plugin: 'com.diffplug.gradle.spotless'
apply plugin: "de.undercouch.download"

task downloadJavaLicense(type: Download) {
src 'https://raw.githubusercontent.com/web3j/build-tools/master/gradle/spotless/java.license'
dest new File("$rootDir/gradle/spotless",'java.license')
quiet true
onlyIfModified true
}

task downloadFormatterProperties(type: Download) {
src 'https://raw.githubusercontent.com/web3j/build-tools/master/gradle/spotless/formatter.properties'
dest new File("$rootDir/gradle/spotless",'formatter.properties')
quiet true
onlyIfModified true
}

spotless {
java {
Expand Down Expand Up @@ -35,3 +50,5 @@ spotless {
paddedCell()
}
}

spotlessCheck.dependsOn('downloadJavaLicense', 'downloadFormatterProperties')

0 comments on commit 2b22462

Please sign in to comment.