From 34c6e2bdc758203517a6f60672d3017089ea8665 Mon Sep 17 00:00:00 2001 From: Harsh Verma <55652117+Harsh3305@users.noreply.github.com> Date: Sat, 18 Mar 2023 21:58:48 +0530 Subject: [PATCH] Updated build.gradle.kts (#5) * Updated build.gradle.kts * Update build workflow --- .github/workflows/build.yml | 4 ---- build.gradle.kts | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b44ba4..6ab3534 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,10 +8,6 @@ on: branches: - 'master' -env: - USERNAME: ${{ secrets.OSSRH_USERNAME }} - TOKEN: ${{ secrets.OSSRH_TOKEN }} - jobs: build: name: Build diff --git a/build.gradle.kts b/build.gradle.kts index 94a8ea5..8c16e04 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,15 +5,33 @@ plugins { id("io.spring.dependency-management") version "1.1.0" kotlin("jvm") version "1.7.22" kotlin("plugin.spring") version "1.7.22" + `maven-publish` } group = "com.hrv.mart" -version = "0.0.1-SNAPSHOT" +version = "0.0.1" java.sourceCompatibility = JavaVersion.VERSION_17 repositories { mavenCentral() } +publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/hrv-mart/api-call") + credentials { + username = project.findProperty("gpr.user") as String? ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") as String? ?: System.getenv("TOKEN") + } + } + } + publications { + register("gpr") { + from(components["java"]) + } + } +} dependencies { implementation("org.springframework.boot:spring-boot-starter-webflux")