Skip to content

Commit

Permalink
build: bump hiero-gradle-conventions to 0.3.4 / correct requires static
Browse files Browse the repository at this point in the history
The dependency analysis - through the update of the plugin to 2.8.x -
now does a better job analyzing "requires static" dependencies.
That's why the update makes the check fail.

This PR changes:
- 'requires static com.github.spotbugs.annotations' for 'main' code to
  'requires static transitive com.github.spotbugs.annotations'
- Removes 'requiresStatic("com.github.spotbugs.annotations")' for unit
  tests as this is inherited from main code dependencies

Signed-off-by: Jendrik Johannes <[email protected]>
  • Loading branch information
jjohannes committed Feb 13, 2025
1 parent 0515075 commit c336ba8
Show file tree
Hide file tree
Showing 47 changed files with 466 additions and 70 deletions.
2 changes: 1 addition & 1 deletion hapi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@
requires transitive io.grpc;
requires io.grpc.protobuf;
requires org.antlr.antlr4.runtime;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 17 additions & 1 deletion hapi/src/testFixtures/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,23 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.hapi.test.fixtures {
exports com.hedera.node.hapi.fixtures;

requires transitive com.hedera.node.hapi;
requires transitive com.hedera.pbj.runtime;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 17 additions & 1 deletion hedera-node/hapi-fees/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.app.hapi.fees {
exports com.hedera.node.app.hapi.fees.pricing;
exports com.hedera.node.app.hapi.fees.usage.crypto;
Expand All @@ -24,5 +40,5 @@
requires com.fasterxml.jackson.databind;
requires org.apache.commons.lang3;
requires org.apache.logging.log4j;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 17 additions & 1 deletion hedera-node/hapi-utils/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.app.hapi.utils {
exports com.hedera.node.app.hapi.utils.fee;
exports com.hedera.node.app.hapi.utils.forensics;
Expand Down Expand Up @@ -37,5 +53,5 @@
requires org.apache.logging.log4j;
requires org.bouncycastle.pkix;
requires org.bouncycastle.provider;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,4 @@ testModuleInfo {
requires("org.junit.jupiter.api")
requires("org.mockito")
requires("org.mockito.junit.jupiter")
requiresStatic("com.github.spotbugs.annotations")
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
requires com.swirlds.platform.core;
requires com.fasterxml.jackson.core;
requires com.fasterxml.jackson.databind;
requires static transitive com.github.spotbugs.annotations;
requires static transitive java.compiler;
requires static com.github.spotbugs.annotations;

provides com.hedera.node.app.service.addressbook.AddressBookService with
AddressBookServiceImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.app.service.addressbook {
exports com.hedera.node.app.service.addressbook;

Expand All @@ -10,5 +26,5 @@
requires com.swirlds.config.api;
requires org.bouncycastle.pkix;
requires org.bouncycastle.provider;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
1 change: 0 additions & 1 deletion hedera-node/hedera-app-spi/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ testModuleInfo {
requires("org.junit.jupiter.params")
requires("org.mockito")
requires("org.mockito.junit.jupiter")
requiresStatic("com.github.spotbugs.annotations")
}
20 changes: 18 additions & 2 deletions hedera-node/hedera-app-spi/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.app.spi {
requires transitive com.hedera.node.app.hapi.utils;
requires transitive com.hedera.node.hapi;
requires transitive com.hedera.pbj.runtime;
requires transitive com.swirlds.common;
requires transitive com.swirlds.config.api;
requires transitive com.swirlds.metrics.api;
requires transitive com.swirlds.state.api;
requires transitive com.hedera.pbj.runtime;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;

exports com.hedera.node.app.spi;
exports com.hedera.node.app.spi.fees;
Expand Down
20 changes: 18 additions & 2 deletions hedera-node/hedera-app-spi/src/testFixtures/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.app.spi.test.fixtures {
exports com.hedera.node.app.spi.fixtures;
exports com.hedera.node.app.spi.fixtures.workflows;
Expand All @@ -7,17 +23,17 @@
requires transitive com.hedera.node.app.service.token; // TMP until FakePreHandleContext can be removed
requires transitive com.hedera.node.app.spi;
requires transitive com.hedera.node.hapi;
requires transitive com.hedera.pbj.runtime;
requires transitive com.swirlds.config.api;
requires transitive com.swirlds.state.api.test.fixtures;
requires transitive com.swirlds.state.api;
requires transitive com.swirlds.state.impl.test.fixtures;
requires transitive com.hedera.pbj.runtime;
requires transitive org.apache.logging.log4j;
requires transitive org.assertj.core;
requires transitive org.junit.jupiter.api;
requires com.hedera.node.app.hapi.utils;
requires com.swirlds.common;
requires com.swirlds.platform.core;
requires org.apache.logging.log4j.core;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
1 change: 0 additions & 1 deletion hedera-node/hedera-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ testModuleInfo {
requires("tuweni.bytes")
requires("uk.org.webcompere.systemstubs.core")
requires("uk.org.webcompere.systemstubs.jupiter")
requiresStatic("com.github.spotbugs.annotations")
}

jmhModuleInfo {
Expand Down
2 changes: 1 addition & 1 deletion hedera-node/hedera-app/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
requires io.netty.transport.classes.epoll;
requires io.netty.transport;
requires org.apache.commons.lang3;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
requires static com.google.auto.service;
requires static java.compiler; // javax.annotation.processing.Generated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
requires com.swirlds.state.impl.test.fixtures;
requires org.apache.logging.log4j;
requires org.assertj.core;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 16 additions & 2 deletions hedera-node/hedera-config/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
/*
* Copyright (C) 2025 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("org.hiero.gradle.module.library")
id("org.hiero.gradle.feature.test-fixtures")
Expand All @@ -12,5 +27,4 @@ testModuleInfo {
requires("org.assertj.core")
requires("org.junit.jupiter.api")
requires("org.junit.jupiter.params")
requiresStatic("com.github.spotbugs.annotations")
}
20 changes: 18 additions & 2 deletions hedera-node/hedera-config/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.config {
exports com.hedera.node.config;
exports com.hedera.node.config.converter;
Expand All @@ -8,11 +24,11 @@

requires transitive com.hedera.node.app.hapi.utils;
requires transitive com.hedera.node.hapi;
requires transitive com.hedera.pbj.runtime;
requires transitive com.swirlds.config.api;
requires transitive com.swirlds.config.extensions;
requires transitive com.hedera.pbj.runtime;
requires com.swirlds.common;
requires org.apache.commons.lang3;
requires org.apache.logging.log4j;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 17 additions & 1 deletion hedera-node/hedera-config/src/testFixtures/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

module com.hedera.node.config.test.fixtures {
exports com.hedera.node.config.testfixtures;

Expand All @@ -10,5 +26,5 @@
requires com.swirlds.merkledb;
requires com.swirlds.platform.core;
requires com.swirlds.virtualmap;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
1 change: 0 additions & 1 deletion hedera-node/hedera-consensus-service-impl/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ testModuleInfo {
requires("org.junit.jupiter.api")
requires("org.mockito")
requires("org.mockito.junit.jupiter")
requiresStatic("com.github.spotbugs.annotations")
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
requires com.swirlds.config.api;
requires com.google.common;
requires org.apache.logging.log4j;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;

provides com.hedera.node.app.service.consensus.ConsensusService with
ConsensusServiceImpl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright (C) 2025 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.
*/

/**
* Provides the classes necessary to manage Hedera Consensus Service.
*/
Expand All @@ -10,5 +26,5 @@
requires transitive com.hedera.node.hapi;
requires transitive com.hedera.pbj.runtime;
requires com.hedera.node.app.hapi.utils;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;
}
18 changes: 16 additions & 2 deletions hedera-node/hedera-file-service-impl/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
/*
* Copyright (C) 2025 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("org.hiero.gradle.module.library") }

description = "Default Hedera File Service Implementation"
Expand All @@ -16,5 +31,4 @@ testModuleInfo {
requires("org.junit.jupiter.api")
requires("org.mockito")
requires("org.mockito.junit.jupiter")
requiresStatic("com.github.spotbugs.annotations")
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
requires com.google.protobuf;
requires org.apache.commons.lang3;
requires org.apache.logging.log4j;
requires static com.github.spotbugs.annotations;
requires static transitive com.github.spotbugs.annotations;

exports com.hedera.node.app.service.file.impl.handlers;
exports com.hedera.node.app.service.file.impl.records;
Expand Down
Loading

0 comments on commit c336ba8

Please sign in to comment.