-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use convention in gradle project structure
Signed-off-by: Taeik Lim <[email protected]>
- Loading branch information
Showing
20 changed files
with
233 additions
and
201 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
plugins { | ||
id "groovy-gradle-plugin" | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
gradlePluginPortal() // give access to gradle community plugins | ||
maven { | ||
url "https://repo.spring.io/milestone/" | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "io.spring.gradle:dependency-management-plugin:1.1.5" | ||
} |
36 changes: 36 additions & 0 deletions
36
buildSrc/src/main/groovy/spring.jdbc.plus.java-conventions.gradle
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,36 @@ | ||
plugins { | ||
id "java-library" | ||
id "checkstyle" | ||
id "idea" | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
tasks.withType(Javadoc).configureEach { enabled = false } | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
options.compilerArgs << '-parameters' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} | ||
|
||
checkstyle { | ||
configFile = file("${project.rootDir}/rule/naver-checkstyle-rules.xml") | ||
configProperties = ["suppressionFile": "${project.rootDir}/tool/naver-checkstyle-suppressions.xml"] | ||
toolVersion = "9.1" | ||
ignoreFailures = true // TODO: return to false | ||
maxErrors = 0 | ||
maxWarnings = 0 | ||
} | ||
|
||
dependencies { | ||
compileOnly("com.google.code.findbugs:jsr305:3.0.2") | ||
testCompileOnly("com.google.code.findbugs:jsr305:3.0.2") | ||
} |
87 changes: 87 additions & 0 deletions
87
buildSrc/src/main/groovy/spring.jdbc.plus.maven-publish-conventions.gradle
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,87 @@ | ||
plugins { | ||
id "maven-publish" | ||
id "signing" | ||
} | ||
|
||
group = "com.navercorp.spring" | ||
version = "3.3.0-SNAPSHOT" | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from components.java | ||
|
||
repositories { | ||
maven { | ||
def ossrhUsername = project.hasProperty("ossrhUsername") ? ossrhUsername : "" | ||
def ossrhPassword = project.hasProperty("ossrhPassword") ? ossrhPassword : "" | ||
|
||
credentials { | ||
username ossrhUsername | ||
password ossrhPassword | ||
} | ||
|
||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl | ||
} | ||
} | ||
|
||
versionMapping { | ||
usage('java-api') { | ||
fromResolutionOf('runtimeClasspath') | ||
} | ||
usage('java-runtime') { | ||
fromResolutionResult() | ||
} | ||
} | ||
|
||
pom { | ||
name = "Spring JDBC Plus" | ||
description = "Spring JDBC Plus" | ||
url = "http://github.com/naver/spring-jdbc-plus" | ||
licenses { | ||
license { | ||
name = "The Apache License, Version 2.0" | ||
url = "http://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "mhyeon-lee" | ||
name = "Myeonghyeon Lee" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = "yd-2" | ||
name = "Youngdae Lee" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = "chanhyeong" | ||
name = "Chanhyeong Cho" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = "wool0826" | ||
name = "Chanwool Jo" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/naver/spring-jdbc-plus.git" | ||
developerConnection = "scm:git:git://github.com/naver/spring-jdbc-plus.git" | ||
url = "https://github.com/naver/spring-jdbc-plus" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.mavenJava | ||
} | ||
|
||
tasks.withType(Sign) { | ||
onlyIf { !version.endsWith("SNAPSHOT") } | ||
} |
13 changes: 13 additions & 0 deletions
13
buildSrc/src/main/groovy/spring.jdbc.plus.spring-bom-conventions.gradle
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,13 @@ | ||
plugins { | ||
id "io.spring.dependency-management" | ||
} | ||
|
||
dependencyManagement { | ||
imports { | ||
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}") { | ||
bomProperties([ | ||
"spring-data-bom.version": "${springDataBomVersion}" | ||
]) | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
springBootVersion=3.3.0-RC1 | ||
springDataBomVersion=2024.0.0-RC1 | ||
kotlinVersion=1.9.20 |
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
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
Oops, something went wrong.