xenoterracide
12/21/2017, 3:24 AMgildor
12/21/2017, 3:37 AMxenoterracide
12/21/2017, 3:38 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 nowplugins
block:
plugin<IdeaPlugin>()
plugin<CheckstylePlugin>()
plugin<MavenPublishPlugin>()
plugin<JavaLibraryPlugin>()
to
plugins {
idea
checkstyle
`maven-publish`
`java-library`
}
dependencyManagement{}
, instead of configure<StandardDependencyManagementExtension> {}
plugin<SpotBugsPlugin>()
You already applied plugin in plugins{}
blockcheckstyle{}
extension instead of configure<CheckstyleExtension>
idea
pluginxenoterracide
12/21/2017, 6:09 AM`java-library`
java
`maven-publish`
checkstyle
id(“com.github.spotbugs”) version “1.6.0"
gildor
12/21/2017, 6:27 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
don’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
and when not toYou need backticks for characters that not valid for kotlin identifiers (for example dash
-
or space)you 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 AMgildor
12/21/2017, 6:36 AMxenoterracide
12/21/2017, 6:38 AMgildor
12/21/2017, 6:39 AMxenoterracide
12/21/2017, 6:41 AMgildor
12/21/2017, 6:44 AMxenoterracide
12/21/2017, 6:44 AMgildor
12/21/2017, 6:44 AMxenoterracide
12/21/2017, 6:45 AMgildor
12/21/2017, 6:46 AMxenoterracide
12/21/2017, 6:46 AMgildor
12/21/2017, 6:47 AMxenoterracide
12/21/2017, 6:47 AMgildor
12/21/2017, 6:48 AMxenoterracide
12/21/2017, 6:49 AMgildor
12/21/2017, 6:50 AMxenoterracide
12/21/2017, 6:50 AMgildor
12/21/2017, 6:51 AM