* Update to setup-java@v2
Missed in #3704
* Use consistent file encoding across builds
This changes to use the recommended config from
https://docs.gradle.org/7.0/userguide/common_caching_problems.html#system_file_encoding
* Don't disable build cache when generating JaCoCo merged report
* Don't set JDK_VERSION env var
This is unnecessary as it isn't used anywhere in the build.
* Remove redundant setup-java action from FOSSA scan workflow
* Ignore the whole FOSSA scan workflow in forks
This ignores the whole job instead of just the fossa-scan action, since we
don't need to run any part of the job in forks of detekt.
* Only test a single older Gradle version
All other tests are run on the current Gradle wrapper version, so there's
no need to also test a recent version in this test.
* Don't spawn more workers than # CPUs
There are only 2 CPUs on Linux & Windows CI hosts, 3 on macOS, and
unknown on contributor's machines. Let Gradle pick an appropriate
default.
* Remove unneeded Gradle cache cleanup task
Issue https://github.com/detekt/detekt/pull/2547#issuecomment-605611809
has been fixed.
* Update Kotlin to 1.4.20
* Update assertj to 3.18.1
* Fix type V but V!! expected compilation errors with 1.4.20
* Remove workaround for old dokka plugin
* Update to Kotlin 1.4.21
* Use jdk8 compatible mockk version
* Update mock to version 1.10.4
* Specify source and target 1.8 java version for KotlinCompile tasks
* Remove shadowJarExecutable as it does not work with newest Kotlin compiler (1.4.20+)
* Simplify copying jars for CI by reusing copy task
* Update cli guide to always use the zip distribution
* fixup! Simplify copying jars for CI by reusing copy task
Co-authored-by: M Schalk <30376729+schalkms@users.noreply.github.com>
* Update to Gradle 6.6
* Update to Kotlin 1.4
* Upgrade to prerelease of KtLint 0.38
* Fix testcase by unwrapping the original descriptor
* Increase max heap for dokka on Java 11
* Update minimal supported Gradle version to 5.3
* Do not run warningsAsErrors on CI due to Gradle not supporting Kotlin 1.4
* Remove new line testing as it fails on windows
* Require Gradle 5.4 to reflect Kotlin's required version from their website
* Use max 4 workers, test discovery slows down parallel workers
* Use a spek snapshot to improve test discovery time
* Introduce an api test fixture for modules needing just an analysis result
* Use api test fixture in html module
* Use api test fixtures in report-xml module
* Use api test fixtures in metrics module
* Use api test fixtures in core module
* Use single-threaded classpath scanning
* Do not create a kotlin environment upfront
* Move mockk usage to execution phase
* Move KtCompiler creation to execution phase
* Move setup code to execution phase in api module
* Move setup code to execution phase in core module
* Move setup code to execution phase in rules-empty module
* Extract detekt related build logic to own script in buildSrc
* Add buildSrc/build folder to excludes
* Extract github release to own releasing build file
* Extract common and publishing build part
* Extract versions and sonar plugins to housekeeping script
* Move dokka plugin to buildSrc
* Move jacoco setup to commons plugin
* Automate version updates
* Rename publishing to packaging to avoid conflict with org.gradle.publishing
* Do not increment the version on build configuration phase
* State why build scan is left in settings build file
* Implement task to generate the doc version
* Implement task to update the self analysis version
* Revert dryRun
* Update dependencies for 1.7.1 release
* Delete obsolete ROADMAP file
* Update gradle wrapper to 6.3 supporting JDK14
* Use github-release plugin to publish changelogs to GitHub
* Use 1.7.1 gradle plugin for self analysis
* Use findProperty to force null on missing
* Convert the gradle plugin to a sub project
This leads to:
- faster build file evaluate, no need to wait for the composite build file evaluation
- cleaner build files, less duplications
- more up-to-date tasks
- faster builds, clean build is ~30 seconds faster
* Setup for easy local gradle plugin changes
* Prepare 1.5.0 gradle plugin release
* Use 1.5.0 for self analysis
* Do not assert number of classes messages on the output anymore
As we have changed detekt to be silent by default, the number of classes in not printed anymore.
We are testing the multi module integration and assert if detekt creates all different kind of reports. Testing the number of classes should not be the primary goal of this test cases.
* Update gradle to 6.1.1
* Update dependencies for 1.2.0
* Generate release notes for 1.2.0
* Checkin cyclomatic complexity documentation
* Update changelog to actual master and consider reverting formatting baseline changes
* Downgrade kotlin version to 1.3.50 to strange JNA warnings which may confuse users
* Upgrade Spek to v2.0.8
* Disable Spek timeouts
* Fix Spek exceptions with by memoized clause
'subject' can not be accessed in this context.
java.lang.AssertionError: 'subject' can not be accessed in this context.
* Use a Spek fixture for holding the result
The tests don't use memoized for holding the result of subject.lint().
Instead the tests use a fixture for holding the linted code.
https://www.spekframework.org/core-concepts/#scope-values
Spek 2.0.3 introduced test timeouts.
(https://github.com/spekframework/spek/releases/tag/2.0.3)
The default timeout is 10 seconds per test case.
Detekt's rule-tests easily reach this limit when
1. setting up 8 `KotlinScriptEngine's` for compiling test snippets.
2. the (CI) machines are under heavy load
This results in the following exception as happened in commit 9691e0d.
kotlinx.coroutines.TimeoutCancellationException:
Timed out waiting for 10000 ms
Unfortunately, Spek doesn't allow to set a global timeout (yet).
See: https://github.com/spekframework/spek/issues/769
Setting a custom timeout on each test block is not what we want.
Therefore, this commit downgrades Spek to version 2.0.2.