From d67e63370c5f34f2e686a11cdc432bdca2ea47c9 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 12:25:29 +1000 Subject: [PATCH 1/6] build - Fix NOTICE --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index 5e256011b..69711b4af 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ Apache Tuweni -Copyright 2019-2023 The Apache Software Foundation +Copyright 2019-2024 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). From 507c06de2030f95db43668a3817884eda257aa80 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 14:00:07 +1000 Subject: [PATCH 2/6] build - publish to GH Packages --- build.gradle | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 289e9de1d..7130584e4 100644 --- a/build.gradle +++ b/build.gradle @@ -323,6 +323,7 @@ allprojects { publishing { repositories { maven { + name = "OSSRH" def isRelease = buildVersion.endsWith('SNAPSHOT') def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2" def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots" @@ -355,6 +356,15 @@ allprojects { } } } + + maven { + name = "GitHubPackages" + url = "https://maven.pkg.github.com/consensys/tuweni" + credentials { + username = System.getenv('GITHUB_ACTOR') + password = System.getenv('GITHUB_TOKEN') + } + } } publications { MavenDeployment(MavenPublication) { publication -> @@ -362,7 +372,7 @@ allprojects { from components.java artifact sourcesJar { classifier 'sources' } } - groupId 'io.tmio' + groupId 'io.consensys' artifactId 'tuweni-' + project.name version project.version @@ -378,7 +388,7 @@ allprojects { pom { name = project.name afterEvaluate { description = project.description } - url = 'https://github.com/tmio/tuweni' + url = 'https://github.com/consensys/tuweni' licenses { license { name = "The Apache License, Version 2.0" @@ -386,9 +396,9 @@ allprojects { } } scm { - connection = 'scm:https://github.com/tmio/tuweni.git' - developerConnection = 'scm:git@github.com:tmio/tuweni.git' - url = 'https://github.com/tmio/tuweni' + connection = 'scm:https://github.com/consensys/tuweni.git' + developerConnection = 'scm:git@github.com:consensys/tuweni.git' + url = 'https://github.com/consensys/tuweni' } developers { developer { @@ -400,7 +410,7 @@ allprojects { } issueManagement { system = "github" - url = "https://www.github.com/tmio/tuweni/issues" + url = "https://www.github.com/consensys/tuweni/issues" } } @@ -415,7 +425,7 @@ allprojects { def addDependencyNode = { dep, optional, scope -> def dependencyNode = dependenciesNode.appendNode('dependency') if (dep instanceof ProjectDependency) { - dependencyNode.appendNode('groupId', 'io.tmio') + dependencyNode.appendNode('groupId', 'io.consensys') dependencyNode.appendNode('artifactId', rootProject.name + '-' + dep.name) dependencyNode.appendNode('version', dep.version) } else { From 7b1f4a58aba696cd251825510e1d87edb4d8c0f0 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 14:06:18 +1000 Subject: [PATCH 3/6] build - GH action to publish to GH packages --- .github/workflows/publish.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..f39a24ee1 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,45 @@ +# +# Licensed to the Consensys AG under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +# This is adapted from https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-gradle + +name: Publish package to GitHub Packages +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + container: + image: tmio/tuweni-build:1.2 + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + - name: Setup Gradle + uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 + + - name: Publish package + run: ./gradlew publishAllPublicationsToGitHubPackagesRepository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 12a2f735057793189b9a4c4efe62271fc58352c6 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 14:25:14 +1000 Subject: [PATCH 4/6] build - Update check notice --- NOTICE | 5 +++-- build.gradle | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NOTICE b/NOTICE index 69711b4af..7b57fab55 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,6 @@ -Apache Tuweni -Copyright 2019-2024 The Apache Software Foundation +Copyright 2023-2024 The Machine Consultancy LLC + +This product includes code developed under the Apache Tuweni incubation project. This product includes software developed at The Apache Software Foundation (http://www.apache.org/). diff --git a/build.gradle b/build.gradle index 7130584e4..2ae4e2375 100644 --- a/build.gradle +++ b/build.gradle @@ -575,7 +575,7 @@ dokkaHtml { project.task("checkNotice") { def lines = file("NOTICE").readLines() - def expected = "Copyright 2019-${LocalDate.now().getYear()} The Apache Software Foundation" + def expected = "Copyright 2023-${LocalDate.now().getYear()} The Machine Consultancy LLC" for (line in lines) { if (expected == line) { return From 4ac250eef1fc22c7831965854d577c49c97b8c4e Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 15:39:22 +1000 Subject: [PATCH 5/6] Update .github/workflows/publish.yml Co-authored-by: Sally MacFarlane --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f39a24ee1..2bd90c09e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,5 @@ # -# Licensed to the Consensys AG under one or more +# Licensed to the Consensys Software Inc under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 From 8508d3266807099e10ef5bac48b1b1267cbb7fd5 Mon Sep 17 00:00:00 2001 From: Usman Saleem Date: Thu, 9 May 2024 15:42:38 +1000 Subject: [PATCH 6/6] build - Update groupId --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 2f5c16d16..7d59e5922 100644 --- a/build.gradle +++ b/build.gradle @@ -372,7 +372,7 @@ allprojects { from components.java artifact sourcesJar { classifier 'sources' } } - groupId 'io.consensys' + groupId 'io.consensys.protocols' artifactId 'tuweni-' + project.name version project.version