Skip to content

Commit

Permalink
Prepare version 0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech committed Apr 10, 2020
1 parent c1d2ea6 commit 5d1dda8
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 21 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Change Log

Version 0.20.0 *(In development)*
---------------------------------
Version 0.20.0 *(2020-04-10)*
-----------------------------

- Resolves Cpd Task Creation Failure [\#204](https://github.com/vanniktech/gradle-code-quality-tools-plugin/pull/204) ([keciciler](https://github.com/keciciler))
- Detekt: Add --parallel parameter support [\#202](https://github.com/vanniktech/gradle-code-quality-tools-plugin/pull/202) ([budnyjj](https://github.com/budnyjj))
- Detekt: Add --build-upon-default-config parameter support [\#201](https://github.com/vanniktech/gradle-code-quality-tools-plugin/pull/201) ([budnyjj](https://github.com/budnyjj))

Version 0.19.0 *(2019-08-20)*
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildscript {
gradlePluginPortal() // Required for the Errorprone Gradle Plugin.
}
dependencies {
classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.19.0"
classpath "com.vanniktech:gradle-code-quality-tools-plugin:0.20.0"
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'com.gradle.publish:plugin-publish-plugin:0.10.1'
classpath 'com.gradle.publish:plugin-publish-plugin:0.11.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.22.0'
classpath 'com.vanniktech:gradle-code-quality-tools-plugin:0.19.0'
classpath 'com.vanniktech:gradle-android-junit-jacoco-plugin:0.15.0'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
GROUP=com.vanniktech
VERSION_NAME=0.20.0-SNAPSHOT
VERSION_NAME=0.20.0

POM_ARTIFACT_ID=gradle-code-quality-tools-plugin
POM_NAME=Gradle Code Quality Tools Plugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import de.aaschmid.gradle.plugins.cpd.CpdExtension
import de.aaschmid.gradle.plugins.cpd.CpdPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.plugins.quality.*
import org.gradle.api.plugins.quality.Checkstyle
import org.gradle.api.plugins.quality.CheckstyleExtension
import org.gradle.api.plugins.quality.CheckstylePlugin
import org.gradle.api.plugins.quality.Pmd
import org.gradle.api.plugins.quality.PmdExtension
import org.gradle.api.plugins.quality.PmdPlugin
import org.gradle.language.base.plugins.LifecycleBasePlugin.CHECK_TASK_NAME
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity.NONE
import org.gradle.api.tasks.PathSensitivity.RELATIVE
import org.gradle.api.tasks.TaskAction
import org.gradle.api.tasks.TaskExecutionException
Expand All @@ -24,7 +23,7 @@ import java.io.File
// Ideally this would be an optional input file - https://github.com/gradle/gradle/issues/2016
@Input @Optional var baselineFilePath: String? = null
@InputFile @PathSensitive(RELATIVE) lateinit var configFile: File
@OutputDirectory @PathSensitive(NONE) lateinit var outputDirectory: File
@OutputDirectory lateinit var outputDirectory: File

init {
group = "verification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import org.gradle.api.DefaultTask
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity.NONE
import org.gradle.api.tasks.TaskAction
import java.io.File

@CacheableTask open class KtLintFormatTask : DefaultTask() {
@Input var experimental: Boolean = false
@Input lateinit var version: String
@OutputDirectory @PathSensitive(NONE) lateinit var outputDirectory: File
@OutputDirectory lateinit var outputDirectory: File

init {
group = "formatting"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ import org.gradle.api.DefaultTask
import org.gradle.api.tasks.CacheableTask
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity.NONE
import org.gradle.api.tasks.TaskAction
import java.io.File

@CacheableTask open class KtLintTask : DefaultTask() {
@Input var experimental: Boolean = false
@Input lateinit var version: String
@OutputDirectory @PathSensitive(NONE) lateinit var outputDirectory: File
@OutputDirectory lateinit var outputDirectory: File

init {
group = "verification"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,35 +63,35 @@ class CodeQualityToolsPluginCpdTest : CommonCodeQualityToolsTest() {
extension.cpd.ignoreFailures = false

assertThat(androidAppProject.addCpd(extension)).isTrue()
assertThat(androidAppProject.cpd.ignoreFailures).isFalse()
assertThat(androidAppProject.cpd.isIgnoreFailures).isFalse()

assertThat(androidLibraryProject.addCpd(extension)).isTrue()
assertThat(androidLibraryProject.cpd.ignoreFailures).isFalse()
assertThat(androidLibraryProject.cpd.isIgnoreFailures).isFalse()

assertThat(javaProject.addCpd(extension)).isTrue()
assertThat(javaProject.cpd.ignoreFailures).isFalse()
assertThat(javaProject.cpd.isIgnoreFailures).isFalse()
}

@Test fun ignoreFailuresTrue() {
val extension = defaultExtensions()
extension.cpd.ignoreFailures = true

assertThat(androidAppProject.addCpd(extension)).isTrue()
assertThat(androidAppProject.cpd.ignoreFailures).isTrue()
assertThat(androidAppProject.cpd.isIgnoreFailures).isTrue()

assertThat(androidLibraryProject.addCpd(extension)).isTrue()
assertThat(androidLibraryProject.cpd.ignoreFailures).isTrue()
assertThat(androidLibraryProject.cpd.isIgnoreFailures).isTrue()

assertThat(javaProject.addCpd(extension)).isTrue()
assertThat(javaProject.cpd.ignoreFailures).isTrue()
assertThat(javaProject.cpd.isIgnoreFailures).isTrue()
}

@Test fun failEarlyFalse() {
val extension = defaultExtensions()
extension.failEarly = false

assertThat(javaProject.addCpd(extension)).isTrue()
assertThat(javaProject.cpd.ignoreFailures).isTrue()
assertThat(javaProject.cpd.isIgnoreFailures).isTrue()
}

@Test fun toolsVersion() {
Expand Down
1 change: 1 addition & 0 deletions src/test/kotlin/com/vanniktech/code/quality/tools/utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import org.gradle.internal.reflect.Instantiator
fun defaultExtensions(): CodeQualityToolsPluginExtension {
// This is not ideal but the only solution I have found that somewhat works.
return CodeQualityToolsPluginExtension(InstantiatorBackedObjectFactory(object : Instantiator {
@Suppress("DEPRECATION")
override fun <T : Any?> newInstance(type: Class<out T>, vararg parameters: Any?): T {
return type.newInstance()
}
Expand Down

0 comments on commit 5d1dda8

Please sign in to comment.