-
Notifications
You must be signed in to change notification settings - Fork 101
Chore/convention plugins #2080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
l-1squared
wants to merge
5
commits into
master
Choose a base branch
from
chore/convention-plugins
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Chore/convention plugins #2080
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
d594b54
chore(): Create Checkstyle plugin
l-1squared 84a9b4c
chore(): Create plugin for common java tasks
l-1squared 0cf2e3b
fix(): update java timing code
l-1squared 46dc640
chore(): Fix java-future-tests issue
l-1squared dda053d
chore(): Port checkstyle version upgrade
l-1squared File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
build-conventions/src/main/kotlin/jgiven-checkstyle.gradle.kts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| plugins { | ||
| checkstyle | ||
| } | ||
|
|
||
| checkstyle { | ||
| toolVersion = "12.2.0" | ||
| configFile = file("${rootProject.projectDir}/checkstyle.xml") | ||
|
|
||
| isShowViolations = true | ||
| isIgnoreFailures = true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| import java.time.LocalDateTime | ||
| import java.time.format.DateTimeFormatter | ||
|
|
||
| plugins { | ||
| java | ||
| jacoco | ||
| } | ||
|
|
||
|
|
||
| tasks.withType<Test> { | ||
| systemProperty("jgiven.report.dir", "build/reports/jgiven/json") | ||
| systemProperty("jgiven.report.text", "false") | ||
|
|
||
| testLogging { | ||
| showStandardStreams = true | ||
| } | ||
| } | ||
|
|
||
| tasks.withType<JavaCompile>().configureEach { | ||
| // needed for DeSzenarioTest.java as it has Umlauts in the code | ||
| options.encoding = "UTF-8" | ||
| } | ||
|
|
||
| tasks.withType<Jar>().configureEach { | ||
| val now = LocalDateTime.now() | ||
| val dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S") | ||
| val yearFormatter = DateTimeFormatter.ofPattern("yyyy") | ||
|
|
||
| manifest { | ||
| attributes( | ||
| "Built-By" to "Gradle ${gradle.gradleVersion}", | ||
| "Build-Date" to now.format(dateFormatter), | ||
| "Copyright" to "2013-${now.format(yearFormatter)} TNG Technology Consulting GmbH", | ||
| "Implementation-Title" to project.name, | ||
| "Implementation-Version" to project.version, | ||
| "Implementation-Vendor" to "TNG Technology Consulting GmbH", | ||
| "License" to "Apache License v2.0, January 2004", | ||
| "Specification-Title" to project.name, | ||
| "Specification-Version" to project.version, | ||
| "Specification-Vendor" to "TNG Technology Consulting GmbH", | ||
| "Automatic-Module-Name" to "com.tngtech.jgiven.${project.name.replace("-", ".").replace("jgiven.", "")}" | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| normalization { | ||
| runtimeClasspath { | ||
| ignore("META-INF/MANIFEST.MF") | ||
| } | ||
| } | ||
|
|
||
| java { | ||
| toolchain { | ||
| languageVersion.set(JavaLanguageVersion.of(17)) | ||
| } | ||
| } | ||
|
|
||
|
|
||
| tasks.withType<Javadoc> { | ||
| // exclude("**/impl/**") | ||
| } | ||
|
|
||
| tasks.named<JacocoReport>("jacocoTestReport") { | ||
| reports { | ||
| xml.required.set(true) // coveralls plugin depends on xml format report | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,11 @@ buildscript { | |
| } | ||
| } | ||
|
|
||
| plugins { | ||
| id 'jgiven-checkstyle' | ||
| } | ||
|
|
||
|
|
||
| repositories { | ||
| google() | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| plugins { | ||
| id("com.android.library") | ||
| id("jgiven-publishing") | ||
| id("jgiven-checkstyle") | ||
| id("maven-publish") | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| plugins { | ||
| id 'java-library' | ||
| id 'jgiven-publishing' | ||
| id('jgiven-checkstyle') | ||
| id('jgiven-java') | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| plugins { | ||
| id 'java-library' | ||
| id('jgiven-publishing') | ||
| id('jgiven-checkstyle') | ||
| id('jgiven-java') | ||
| } | ||
|
|
||
| dependencies { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,7 @@ | ||
| plugins { | ||
| id 'java-library' | ||
| id('jgiven-checkstyle') | ||
| id('jgiven-java') | ||
| } | ||
|
|
||
| repositories { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid question: those two could not be moved into the conventions for technical reasons? Or are there some modules which would not take kindly to them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite get your question...
Regarding the choice of having extra modules, it is twofold:
Does that answer it?