-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add buildfile specifically for release
- Loading branch information
1 parent
9c15af4
commit 3568253
Showing
1 changed file
with
76 additions
and
0 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,76 @@ | ||
plugins { | ||
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins | ||
checkstyle | ||
`java-library` | ||
`version-catalog` | ||
`maven-publish` | ||
} | ||
|
||
val group: String by project | ||
val edcScmUrl: String by project | ||
val edcScmConnection: String by project | ||
|
||
allprojects { | ||
apply(plugin = "checkstyle") | ||
apply(plugin = "maven-publish") | ||
|
||
// let's not generate any reports because that is done from within the GitHub Actions workflow | ||
tasks.withType<Checkstyle> { | ||
reports { | ||
html.required.set(false) | ||
xml.required.set(true) | ||
} | ||
} | ||
|
||
tasks.withType<Jar> { | ||
duplicatesStrategy = DuplicatesStrategy.INCLUDE | ||
metaInf { | ||
from("${rootProject.projectDir.path}/NOTICE.md") | ||
from("${rootProject.projectDir.path}/LICENSE") | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
// values needed for publishing | ||
val websiteUrl: String by project | ||
val developerId: String by project | ||
val developerName: String by project | ||
val developerEmail: String by project | ||
val scmConnection: String by project | ||
val scmUrl: String by project | ||
publishing { | ||
publications.forEach { i -> | ||
val mp = (i as MavenPublication) | ||
mp.pom { | ||
name.set(project.name) | ||
description.set("Runtime metamodel for annotations of the Eclipse Dataspace Components") | ||
url.set(websiteUrl) | ||
|
||
licenses { | ||
license { | ||
name.set("The Apache License, Version 2.0") | ||
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt") | ||
} | ||
developers { | ||
developer { | ||
id.set(developerId) | ||
name.set(developerName) | ||
email.set(developerEmail) | ||
} | ||
} | ||
scm { | ||
connection.set(scmConnection) | ||
url.set(scmUrl) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
} | ||
// configure checkstyle version | ||
checkstyle { | ||
toolVersion = "10.0" | ||
maxErrors = 0 // does not tolerate errors | ||
} |