Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ build/
.gradle/
buildSrc/.kotlin/

# Ignore Gradle wrapper jar file
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper-*.sha256

# Maven
**/.mvn/wrapper/maven-wrapper.jar
target/
Expand All @@ -13,3 +17,5 @@ target/
out/

conformance/conformance-server.pid

/.env
2 changes: 1 addition & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins {
`java-platform`
`maven-publish`
signing
`cel-conventions`
id("cel-conventions")
}

dependencies {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@ import org.jetbrains.gradle.ext.settings
fun Project.nessieIde() {
apply<EclipsePlugin>()

if (this == rootProject) {
if (path == ":") {

val projectName = rootProject.file("ide-name.txt").readText().trim()
val ideName =
"$projectName ${rootProject.version.toString().replace(Regex("^([0-9.]+).*"), "$1")}"
val projectName = layout.settingsDirectory.file("ide-name.txt").asFile.readText().trim()
val ideName = "$projectName ${version.toString().replace(Regex("^([0-9.]+).*"), "$1")}"

apply<IdeaExtPlugin>()
configure<IdeaModel> {
Expand All @@ -51,7 +50,11 @@ fun Project.nessieIde() {
profiles.create("Nessie-ASF") {
// strip trailing LF
val copyrightText =
rootProject.file("codestyle/copyright-header.txt").readLines().joinToString("\n")
layout.settingsDirectory
.file("codestyle/copyright-header.txt")
.asFile
.readLines()
.joinToString("\n")
notice = copyrightText
}
}
Expand All @@ -63,8 +66,9 @@ fun Project.nessieIde() {
defaults = true

jvmArgs =
rootProject.projectDir
.resolve("gradle.properties")
layout.settingsDirectory
.file("gradle.properties")
.asFile
.reader()
.use {
val rules = java.util.Properties()
Expand All @@ -81,10 +85,13 @@ fun Project.nessieIde() {

// There's no proper way to set the name of the IDEA project (when "just importing" or syncing
// the Gradle project)
val ideaDir = projectDir.resolve(".idea")
val ideaDir = layout.projectDirectory.dir(".idea").asFile

if (ideaDir.isDirectory) {
ideaDir.resolve(".name").writeText(ideName)
if (java.lang.Boolean.getBoolean("idea.sync.active") && ideaDir.isDirectory) {
val ideaNameFile = ideaDir.resolve(".name")
if (!ideaNameFile.isFile || ideaNameFile.readText() != ideName) {
ideaNameFile.writeText(ideName)
}
}

configure<EclipseModel> { project { name = ideName } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fun Project.nessieConfigureJava() {
}
}

if (project != rootProject) {
if (path != ":") {
tasks.withType<Jar>().configureEach { duplicatesStrategy = DuplicatesStrategy.WARN }
}
}
Loading
Loading