-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com>
- Loading branch information
Showing
109 changed files
with
1,066 additions
and
955 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
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,6 @@ | ||
# This file is here for 'hapi', because that "product" is missing the toplevel folder | ||
# (it contains the 'hapi' module directly) | ||
hedera-base@swirldslabs.com=Hedera Base Team | ||
hedera-services@swirldslabs.com=Hedera Services Team | ||
hedera-smart-contracts@swirldslabs.com=Hedera Smart Contracts Team | ||
release-engineering@swirldslabs.com=Release Engineering Team |
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 @@ | ||
develop |
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,39 @@ | ||
/* | ||
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { gradlePluginPortal() } | ||
|
||
dependencies { | ||
implementation("com.adarshr:gradle-test-logger-plugin:4.0.0") | ||
implementation("com.autonomousapps:dependency-analysis-gradle-plugin:1.32.0") | ||
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.25.0") | ||
implementation("com.google.protobuf:protobuf-gradle-plugin:0.9.4") | ||
implementation("com.gradle:develocity-gradle-plugin:3.17.5") | ||
implementation("com.gradleup.shadow:shadow-gradle-plugin:8.3.0") | ||
implementation( | ||
"gradle.plugin.com.google.cloud.artifactregistry:artifactregistry-gradle-plugin:2.2.2" | ||
) | ||
implementation("io.github.gradle-nexus:publish-plugin:1.3.0") | ||
implementation("me.champeau.jmh:jmh-gradle-plugin:0.7.2") | ||
implementation("net.swiftzer.semver:semver:1.3.0") | ||
implementation("org.gradlex:extra-java-module-info:1.8") | ||
implementation("org.gradlex:jvm-dependency-conflict-resolution:2.1.2") | ||
implementation("org.gradlex:java-module-dependencies:1.7") | ||
} |
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 @@ | ||
21.0.4 |
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
29 changes: 29 additions & 0 deletions
29
gradle/plugins/src/main/kotlin/com.hedera.gradle.build.settings.gradle.kts
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,29 @@ | ||
/* | ||
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
pluginManagement { repositories { gradlePluginPortal() } } | ||
|
||
plugins { | ||
id("org.gradlex.java-module-dependencies") | ||
id("com.hedera.gradle.feature.build-cache") | ||
id("com.hedera.gradle.feature.repositories") | ||
id("com.hedera.gradle.report.develocity") | ||
} | ||
|
||
// Allow projects inside a build to be addressed by dependency coordinates notation. | ||
// https://docs.gradle.org/current/userguide/composite_builds.html#included_build_declaring_substitutions | ||
// Some functionality of the 'java-module-dependencies' plugin relies on this. | ||
includeBuild(".") |
37 changes: 37 additions & 0 deletions
37
gradle/plugins/src/main/kotlin/com.hedera.gradle.check.dependencies.gradle.kts
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,37 @@ | ||
/* | ||
* Copyright (C) 2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import com.autonomousapps.DependencyAnalysisSubExtension | ||
import org.gradlex.javamodule.dependencies.tasks.ModuleDirectivesOrderingCheck | ||
import org.gradlex.javamodule.dependencies.tasks.ModuleDirectivesScopeCheck | ||
|
||
plugins { | ||
id("com.autonomousapps.dependency-analysis") | ||
id("com.hedera.gradle.base.lifecycle") | ||
id("com.hedera.gradle.jpms-modules") | ||
} | ||
|
||
// ordering check is done by SortModuleInfoRequiresStep | ||
tasks.withType<ModuleDirectivesOrderingCheck> { enabled = false } | ||
|
||
// Do not report dependencies from one source set to another as 'required'. | ||
// In particular, in case of test fixtures, the analysis would suggest to | ||
// add as testModuleInfo { require(...) } to the main module. This is | ||
// conceptually wrong, because in whitebox testing the 'main' and 'test' | ||
// module are conceptually considered one module (main module extended with tests) | ||
configure<DependencyAnalysisSubExtension> { issues { onAny { exclude(project.path) } } } | ||
|
||
tasks.named("qualityGate") { dependsOn(tasks.withType<ModuleDirectivesScopeCheck>()) } |
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
29 changes: 29 additions & 0 deletions
29
gradle/plugins/src/main/kotlin/com.hedera.gradle.check.spotless-misc.gradle.kts
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,29 @@ | ||
/* | ||
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { id("com.diffplug.spotless") } | ||
|
||
spotless { | ||
format("misc") { | ||
// define the files to apply `misc` to | ||
target(".gitignore") | ||
|
||
// define the steps to apply to those files | ||
trimTrailingWhitespace() | ||
indentWithSpaces() | ||
endWithNewline() | ||
} | ||
} |
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
47 changes: 47 additions & 0 deletions
47
gradle/plugins/src/main/kotlin/com.hedera.gradle.check.spotless.gradle.kts
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,47 @@ | ||
/* | ||
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
id("com.hedera.gradle.base.lifecycle") | ||
id("com.diffplug.spotless") | ||
} | ||
|
||
spotless { | ||
// Disable the automatic application of Spotless to all source sets when the check task is run. | ||
isEnforceCheck = false | ||
|
||
// limit format enforcement to just the files changed by this feature branch | ||
@Suppress("UnstableApiUsage") | ||
ratchetFrom( | ||
"origin/" + | ||
providers | ||
.fileContents( | ||
isolated.rootProject.projectDirectory.file("gradle/development-branch.txt") | ||
) | ||
.asText | ||
.getOrElse("main") | ||
) | ||
} | ||
|
||
tasks.withType<JavaCompile>().configureEach { | ||
// When doing a 'qualityGate' run, make sure spotlessApply is done before doing compilation and | ||
// other checks based on compiled code | ||
mustRunAfter(tasks.spotlessApply) | ||
} | ||
|
||
tasks.named("qualityCheck") { dependsOn(tasks.spotlessCheck) } | ||
|
||
tasks.named("qualityGate") { dependsOn(tasks.spotlessApply) } |
Oops, something went wrong.