From a6d77b217a633e86116692e2a60780b1cbea6f36 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Thu, 5 Sep 2024 13:46:00 -0400 Subject: [PATCH] feat: Update actions and libs. --- .github/workflows/ci.yml | 10 +++++----- build.gradle | 21 ++++++++++++--------- docker/backend_alpine.Dockerfile | 2 +- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 565ce03..b3676a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,14 +47,14 @@ jobs: architecture: x64 - name: Build with Gradle - uses: gradle/gradle-build-action@v2 - env: - GITHUB_DEPLOY_USER: "${{ github.actor }}" - GITHUB_DEPLOY_TOKEN: "${{ secrets.DEPLOY_TOKEN }}" - GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }} + uses: gradle/actions/setup-gradle@v3 with: gradle-version: 8.0.2 arguments: build + env: + GITHUB_DEPLOY_USER: ${{ github.actor }} + GITHUB_DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + GITHUB_DEPLOY_REPOSITORY: ${{ secrets.DEPLOY_REPOSITORY }} - name: Upload descriptor file artifact uses: actions/upload-artifact@v4 diff --git a/build.gradle b/build.gradle index b49c10d..c402c3f 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,7 @@ group 'com.nikhilm' sourceCompatibility = 1.11 def grpcVersion = '1.62.2' +def protobufVersion = '3.25.3' def baseVersion = '3.9.4' def baseGroupId = 'io.github.adempiere' def privateDependencyBaseVersion = "adempiere-3.9.4" @@ -38,21 +39,23 @@ repositories { mavenLocal() mavenCentral() maven { - url = System.getenv("GITHUB_DEPLOY_REPOSITORY") ?: System.properties['deploy.repository'] ?: 'https://maven.pkg.github.com' - credentials { - username = System.getenv("GITHUB_DEPLOY_USER") ?: System.properties['deploy.user'] - password = System.getenv("GITHUB_DEPLOY_TOKEN") ?: System.properties['deploy.token'] + // Adempiere GitHub Organization + url = findProperty("deployRepository") ?: System.properties['deploy.repository'] ?: System.getenv("GITHUB_DEPLOY_REPOSITORY") ?: 'https://maven.pkg.github.com' + credentials { + // project property, system properrty, enviroment variable + username = findProperty("deployUsername") ?: System.properties['deploy.user'] ?: System.getenv("GITHUB_DEPLOY_USER") + password = findProperty("deployToken") ?: System.properties['deploy.token'] ?: System.getenv("GITHUB_DEPLOY_TOKEN") } } } protobuf { protoc { - artifact = "com.google.protobuf:protoc:3.25.3" + artifact = "com.google.protobuf:protoc:${protobufVersion}" } plugins { grpc { - artifact = 'io.grpc:protoc-gen-grpc-java:1.34.1' + artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}" } } generateProtoTasks { @@ -146,8 +149,8 @@ dependencies { implementation "io.grpc:grpc-stub:${grpcVersion}" implementation "io.grpc:grpc-netty:${grpcVersion}" // https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java - implementation 'com.google.protobuf:protobuf-java:3.25.3' - implementation 'com.google.protobuf:protobuf-java-util:3.25.3' + implementation "com.google.protobuf:protobuf-java:${protobufVersion}" + implementation "com.google.protobuf:protobuf-java-util:${protobufVersion}" //implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359' //implementation 'com.sun.xml.bind:jaxb-impl:3.0.0-M4' @@ -157,7 +160,7 @@ dependencies { // ADempiere Core implementation "${baseGroupId}:base:${baseVersion}" - implementation "${baseGroupId}:adempiere-grpc-utils:1.3.4" + implementation "${baseGroupId}:adempiere-grpc-utils:1.3.8" // Others compileOnly 'org.apache.tomcat:annotations-api:6.0.53' diff --git a/docker/backend_alpine.Dockerfile b/docker/backend_alpine.Dockerfile index a034b25..54ff905 100644 --- a/docker/backend_alpine.Dockerfile +++ b/docker/backend_alpine.Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:11.0.22_7-jdk-focal +FROM eclipse-temurin:11.0.22_7-jdk-alpine LABEL maintainer="ySenih@erpya.com; EdwinBetanc0urt@outlook.com;" \ description="Backend gRPC"