Skip to content

Commit

Permalink
build: use common Hiero Gradle config (#302)
Browse files Browse the repository at this point in the history
Signed-off-by: Jendrik Johannes <jendrik.johannes@gmail.com>
  • Loading branch information
jjohannes authored Jan 13, 2025
1 parent e0ab4f8 commit 2fbee2b
Show file tree
Hide file tree
Showing 50 changed files with 557 additions and 1,264 deletions.
12 changes: 11 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
version: 2
updates:
- package-ecosystem: "gradle"
directory: "/"
directory: "/pbj-core"
schedule:
interval: "daily"
open-pull-requests-limit: 10
- package-ecosystem: "gradle"
directory: "/pbj-integration-tests"
schedule:
interval: "daily"
open-pull-requests-limit: 10
- package-ecosystem: "gradle"
directory: "/pbj-core/hiero-dependency-versions"
schedule:
interval: "daily"
open-pull-requests-limit: 10
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/flow-deploy-release-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,21 @@ jobs:
working-directory: ${{ env.PBJ_CORE }}
run: ./gradlew assemble --scan

- name: Gradle Maven Central Release
if: ${{ needs.prepare-release.outputs.mode == 'specified' && !cancelled() && !failure() }}
- name: Gradle Release Maven Central
if: ${{ !cancelled() && !failure() }}
working-directory: ${{ env.PBJ_CORE }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
NEXUS_USERNAME: ${{ secrets.OSSRH_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# The 'releaseMavenCentral' task will select if Release or Snapshot based on the version
run: |
./gradlew release --no-parallel --scan -PpublishSigningEnabled=true \
-Pgradle.publish.key=${GRADLE_PUBLISH_KEY} -Pgradle.publish.secret=${GRADLE_PUBLISH_SECRET}
./gradlew releaseMavenCentral -PpublishingPackageGroup=com.hedera.pbj -PpublishSigningEnabled=true --no-configuration-cache --scan
- name: Gradle Maven Central Snapshot
if: ${{ needs.prepare-release.outputs.mode == 'snapshot' && !cancelled() && !failure() }}
- name: Gradle Plugin Portal Release
if: ${{ needs.prepare-release.outputs.mode == 'specified' && !cancelled() && !failure() }}
working-directory: ${{ env.PBJ_CORE }}
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: ./gradlew releaseSnapshot --no-parallel --scan -PpublishSigningEnabled=true
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: |
./gradlew publishPlugins -PpublishSigningEnabled=true --no-configuration-cache --scan
9 changes: 0 additions & 9 deletions .github/workflows/zxc-compile-pbj-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,6 @@ jobs:
# project-token: ${{ secrets.codacy-project-token }}
# coverage-reports: ${{ env.PBJ_CORE }}/pbj-compiler/build/reports/jacoco/test/jacocoTestReport.xml, ${{ env.PBJ_CORE }}/pbj-runtime/build/reports/jacoco/test/jacocoTestReport.xml

- name: Gradle Maven Local (PBJ Core)
id: gradle-publish-local
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
if: ${{ (inputs.enable-integration-tests || inputs.enable-jmh-tests) && steps.gradle-build.conclusion == 'success' && !cancelled() }}
with:
gradle-version: ${{ inputs.gradle-version }}
build-root-directory: ${{ env.PBJ_CORE }}
arguments: publishToMavenLocal --scan

- name: Gradle Assemble (PBJ Integration)
id: gradle-integration-build
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
Expand Down
19 changes: 0 additions & 19 deletions pbj-core/build.gradle.kts

This file was deleted.

13 changes: 3 additions & 10 deletions pbj-core/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
# Version number
version=0.9.13-SNAPSHOT
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8

# Need increased heap for running Gradle itself, or SonarQube will run the JVM out of metaspace
org.gradle.jvmargs=-Xmx2048m

# Enable Gradle Caching
# Enable Gradle Caching and Parallelism
org.gradle.caching=true

org.gradle.configuration-cache=true
org.gradle.parallel=true

# Disable publish signing by default
publishSigningEnabled=false
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2022-2024 Hedera Hashgraph, LLC
* Copyright (C) 2024-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.
Expand All @@ -15,10 +15,10 @@
*/

plugins {
id("java-library")
id("com.hedera.pbj.conventions")
id("org.hiero.gradle.base.lifecycle")
id("org.hiero.gradle.report.code-coverage")
id("org.hiero.gradle.check.spotless")
id("org.hiero.gradle.check.spotless-kotlin")
}

val maven = publishing.publications.create<MavenPublication>("maven") { from(components["java"]) }

signing.sign(maven)
dependencies { implementation(project(":pbj-grpc-helidon")) }
13 changes: 13 additions & 0 deletions pbj-core/gradle/license-header.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Copyright (C) $YEAR 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.
8 changes: 0 additions & 8 deletions pbj-core/gradle/modules.properties

This file was deleted.

32 changes: 0 additions & 32 deletions pbj-core/gradle/plugins/build.gradle.kts

This file was deleted.

83 changes: 0 additions & 83 deletions pbj-core/gradle/plugins/src/main/kotlin/Utils.kt

This file was deleted.

This file was deleted.

Loading

0 comments on commit 2fbee2b

Please sign in to comment.