Skip to content
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

build: replace 'developer.properties' with generic Hiero entry #38

Merged
merged 1 commit into from
Dec 11, 2024
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,21 @@ plugins {
There is a [minimal example](example) setup.

```
├── settings.gradle.kts // Entriy point (see above)
├── settings.gradle.kts // Entriy point (see above)
├── gradle.properties // Turn on Gradle caches
├── gradle/aggregation/build.gradle.kts // List of all product/service modules for consistent resolution
├── gradle/toolchain-versions.properties // JDK version (and other tools if applicable)
├── gradle/wrapper/gradle-wrapper.properties // Gradle version (defined through Gradle wrapper)
├── hiero-dependency-versions/build.gradle.kts // Versions of 3rd-party modules
├── product-a // Folder containing all modules of 'product-a'
│ ├── module-app // Example of a Application module
│ │ ├── build.gradle.kts // Select which build features to use in 'plugins {}' (see above)
│ │ ├── build.gradle.kts // Select which build features to use in 'plugins {}' (see above)
│ │ └── src/main/java/module-info.java // Define dependencies to other modules
│ ├── module-lib // Example of a Library module
│ │ ├── build.gradle.kts // Select which build features to use in 'plugins {}' (see above)
│ │ ├── build.gradle.kts // Select which build features to use in 'plugins {}' (see above)
│ │ └── src/main/java/module-info.java // Define dependencies to other modules
── description.txt // Description of the product (for published metadata)
└── developers.properties // Developers of the product (for published metadata)
── description.txt // Description of the product (for published metadata),
// or set 'description' for individual module in build.gradle.kts
└── version.txt // Version of all modules/products
```

Expand All @@ -86,7 +86,7 @@ Each plugin configures a certain build aspect, following this naming pattern:
- `org.hiero.gradle.check.*` _Check_ plugins help with keeping the software maintainable over time.
They check things like the dependency setup or code formatting.
- `org.hiero.gradle.report.*` _Report_ plugins configure the export of information into reports that can be picked
up by other systems - e.g. for code coverage reporting.
up by other systems - e.g. for code coverage reporting.
- `org.hiero.gradle.module.*` _Module_ plugins combine plugins from all categories above to define
_Module Types_ that are then used in the `build.gradle.kts` files of the individual Modules of our software.

Expand Down
2 changes: 1 addition & 1 deletion developers.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
release-engineering@hiero.org=Release Engineering Team
info@lfdecentralizedtrust.org=The Hiero Team
1 change: 0 additions & 1 deletion example/product-a/developers.properties

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
import java.util.Properties

plugins {
id("java")
id("maven-publish")
Expand Down Expand Up @@ -35,27 +33,6 @@ publishing.publications.withType<MavenPublication>().configureEach {
suppressAllPomMetadataWarnings()

pom {
val devGroups = Properties()
@Suppress("UnstableApiUsage")
val developerProperties =
if (project.path == isolated.rootProject.path) {
layout.projectDirectory.file("developers.properties")
} else {
layout.projectDirectory.file("../developers.properties")
}
devGroups.load(
providers
.fileContents(developerProperties)
.asText
.orElse(
provider {
throw RuntimeException("${developerProperties.asFile} does not exist")
}
)
.get()
.reader()
)

name = project.name
url = "https://hiero.org/"
inceptionYear = "2024"
Expand Down Expand Up @@ -94,14 +71,12 @@ publishing.publications.withType<MavenPublication>().configureEach {
}

developers {
devGroups.forEach { mail, team ->
developer {
id = team as String
name = team as String
email = mail as String
organization = "Hiero - a Linux Foundation Decentralized Trust project"
organizationUrl = "https://hiero.org/"
}
developer {
id = "hiero"
name = "The Hiero Team"
email = "[email protected]"
organization = "Hiero - a Linux Foundation Decentralized Trust project"
organizationUrl = "https://hiero.org/"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class MavenCentralPublishTest {
p.settingsFile.appendText(
"""javaModules { directory("product-b") { group = "org.foo" } }"""
)
p.file("product-b/developers.properties", "")
p.file("product-b/module-b/src/main/java/module-info.java", "module org.foo.module.b {}")
p.file(
"product-b/module-b/build.gradle.kts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class GradleProject {
val versionFile = file("version.txt")
private val toolchainVersionsFile = file("gradle/toolchain-versions.properties")

private val developersProperties = file("product/developers.properties")
val descriptionTxt = file("product/description.txt")
val moduleBuildFile = file("product/module-a/build.gradle.kts")
private val moduleInfo = file("product/module-a/src/main/java/module-info.java")
Expand Down Expand Up @@ -66,7 +65,6 @@ class GradleProject {
aggregation.writeFormatted("""plugins { id("org.hiero.gradle.base.lifecycle") }""")
versionFile.writeText("1.0")
toolchainVersionsFile.writeText("jdk=17.0.12")
developersProperties.writeText("[email protected]")
descriptionTxt.writeText("A module to test hiero-gradle-conventions")
moduleInfoFile("module org.hiero.product.module.a {}")
javaSourceFile(
Expand Down