xenoterracide
12/21/2017, 3:24 AMgildor
12/21/2017, 3:37 AMxenoterracide
12/21/2017, 3:38 AMxenoterracide
12/21/2017, 3:39 AMxenoterracide
12/21/2017, 3:41 AMconfigure<CheckstyleExtension> {
toolVersion = "8.4"
sourceSets.addAll(java.sourceSets.filter { it.name != "test" })
}
is the best way to exclude tests, but I didn't see another way to do it, there was just a way to disable it in groovygildor
12/21/2017, 3:41 AMbuildscript
if use settings.gradle to configure dependency-management-plugin that not published to plugins.gradle.org
You also can configure all the tasks inside tasks{} block, but almost the same what you have nowgildor
12/21/2017, 3:43 AMplugins
block:
plugin<IdeaPlugin>()
plugin<CheckstylePlugin>()
plugin<MavenPublishPlugin>()
plugin<JavaLibraryPlugin>()
to
plugins {
idea
checkstyle
`maven-publish`
`java-library`
}
gildor
12/21/2017, 3:44 AMdependencyManagement{}
, instead of configure<StandardDependencyManagementExtension> {}
gildor
12/21/2017, 3:45 AMplugin<SpotBugsPlugin>()
You already applied plugin in plugins{}
blockgildor
12/21/2017, 3:46 AMcheckstyle{}
extension instead of configure<CheckstyleExtension>
gildor
12/21/2017, 3:47 AMidea
plugingildor
12/21/2017, 5:57 AMgildor
12/21/2017, 5:58 AMgildor
12/21/2017, 5:59 AMgildor
12/21/2017, 5:59 AMgildor
12/21/2017, 6:00 AMxenoterracide
12/21/2017, 6:09 AMxenoterracide
12/21/2017, 6:10 AMxenoterracide
12/21/2017, 6:11 AMxenoterracide
12/21/2017, 6:11 AM`java-library`
java
`maven-publish`
checkstyle
id(“com.github.spotbugs”) version “1.6.0"
xenoterracide
12/21/2017, 6:11 AMgildor
12/21/2017, 6:27 AMgildor
12/21/2017, 6:27 AMgildor
12/21/2017, 6:28 AMyou also can’t use latest in the plugins block right?yes, just use not snapshot version and not dynamic, not sure why snapshot is restricted, because it can be helpful for testing and deubg
gildor
12/21/2017, 6:29 AMdon’t think I was pulling in the snapshot versionOh, I see, not sure like laste.version works. If you just need release you can remove all the code from settings.gradle.kts and use release
gildor
12/21/2017, 6:30 AMgildor
12/21/2017, 6:31 AMand when not toYou need backticks for characters that not valid for kotlin identifiers (for example dash
-
or space)gildor
12/21/2017, 6:31 AMgildor
12/21/2017, 6:32 AMyou also can’t use latest in the plugins block rightIt’s good practice actually, because you have repeatable builds and faster, because gradle doesn’t check for a new version all the time.
xenoterracide
12/21/2017, 6:35 AMxenoterracide
12/21/2017, 6:35 AMxenoterracide
12/21/2017, 6:35 AMxenoterracide
12/21/2017, 6:36 AMgildor
12/21/2017, 6:36 AMgildor
12/21/2017, 6:36 AMxenoterracide
12/21/2017, 6:38 AMgildor
12/21/2017, 6:39 AMgildor
12/21/2017, 6:41 AMxenoterracide
12/21/2017, 6:41 AMxenoterracide
12/21/2017, 6:43 AMgildor
12/21/2017, 6:44 AMxenoterracide
12/21/2017, 6:44 AMgildor
12/21/2017, 6:44 AMgildor
12/21/2017, 6:45 AMxenoterracide
12/21/2017, 6:45 AMgildor
12/21/2017, 6:46 AMgildor
12/21/2017, 6:46 AMxenoterracide
12/21/2017, 6:46 AMxenoterracide
12/21/2017, 6:47 AMgildor
12/21/2017, 6:47 AMxenoterracide
12/21/2017, 6:47 AMgildor
12/21/2017, 6:48 AMgildor
12/21/2017, 6:48 AMxenoterracide
12/21/2017, 6:49 AMgildor
12/21/2017, 6:50 AMxenoterracide
12/21/2017, 6:50 AMxenoterracide
12/21/2017, 6:50 AMxenoterracide
12/21/2017, 6:50 AMgildor
12/21/2017, 6:51 AM