-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
860 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
* eol=lf | ||
|
||
# specific for windows script files | ||
*.bat text eol=crlf | ||
|
||
# required by gradle on Windows | ||
*.jar eol=auto | ||
buildscript-gradle.lockfile text eol=auto | ||
gradle.lockfile text eol=auto |
This file contains 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,30 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
workflow_call: | ||
|
||
concurrency: | ||
group: ci-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: oracle | ||
java-version: 21 | ||
check-latest: true | ||
- uses: gradle/actions/setup-gradle@v3 | ||
- run: ./gradlew compileJava compileTestJava | ||
- run: ./gradlew checkstyleMain checkstyleTest | ||
- run: ./gradlew sonarlintMain sonarlintTest | ||
- run: ./gradlew javadoc | ||
- run: ./gradlew test | ||
- run: ./gradlew build -x check |
This file contains 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,14 @@ | ||
name: Auto approve for owner | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
approve: | ||
if: github.actor == github.repository_owner | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: hmarr/auto-approve-action@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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 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,115 @@ | ||
buildscript { | ||
configurations.classpath { | ||
resolutionStrategy.activateDependencyLocking() | ||
} | ||
} | ||
|
||
plugins { | ||
id('checkstyle') | ||
id('java-library') | ||
|
||
alias(libs.plugins.prettyJupiter) | ||
alias(libs.plugins.sonarlint) | ||
alias(libs.plugins.strictNullCheck) | ||
} | ||
|
||
group = 'io.github.joselion' | ||
|
||
java { | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(21) | ||
vendor = JvmVendorSpec.ORACLE | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
javadoc { | ||
title = 'Spring R2DBC Relational' | ||
options { | ||
encoding = 'UTF-8' | ||
addBooleanOption('html5', true) | ||
addStringOption('Xwerror', '-quiet') | ||
tags('apiNote') | ||
} | ||
} | ||
|
||
jar { | ||
from(sourceSets.main.allSource) | ||
manifest { | ||
attributes( | ||
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})", | ||
'Build-Jdk-Spec': java.sourceCompatibility, | ||
'Created-By': "Gradle ${gradle.gradleVersion}", | ||
'Implementation-Title': project.name, | ||
'Implementation-Vendor': 'Jose Luis Leon', | ||
'Implementation-Version': project.version, | ||
'Package': "${project.group}.${project.name}", | ||
) | ||
} | ||
} | ||
|
||
checkstyle { | ||
setToolVersion(libs.versions.checkstyle.get()) | ||
} | ||
|
||
sonarLint { | ||
setToolVersion(libs.versions.sonarlint.core.get()) | ||
languages { | ||
include('java') | ||
} | ||
rules { | ||
enable( | ||
'java:S4266', // "Stream.collect()" calls should not be redundant | ||
) | ||
disable( | ||
'java:S107', // Allow constructors with more than 7 parameters | ||
'java:S3776', // Allow methods with more than 15 lines | ||
'java:S4032', // Allow packages only containing `package-info.java` | ||
) | ||
} | ||
} | ||
|
||
strictNullCheck { | ||
addEclipse() | ||
packageInfo { | ||
useEclipse() | ||
javadoc = '@author Jose Luis Leon' | ||
} | ||
} | ||
|
||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
|
||
// Workaround for: https://github.com/checkstyle/checkstyle/issues/14211 | ||
configurations.checkstyle { | ||
resolutionStrategy.capabilitiesResolution.withCapability("com.google.collections:google-collections") { | ||
select("com.google.guava:guava:0") | ||
} | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
annotationProcessor(libs.lombok) | ||
compileOnly(libs.lombok) | ||
sonarlintCorePlugins(libs.sonarlint.java) | ||
} | ||
|
||
testing { | ||
suites { | ||
test { | ||
useJUnitJupiter(libs.versions.junit.get()) | ||
|
||
dependencies { | ||
annotationProcessor(libs.lombok) | ||
compileOnly(libs.lombok) | ||
|
||
implementation(libs.assertj.core) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.