diff --git a/build.gradle b/build.gradle index dcb3b61..e69de29 100644 --- a/build.gradle +++ b/build.gradle @@ -1,2 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - diff --git a/lib/build.gradle b/lib/build.gradle index 4cac408..0964685 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -24,7 +24,7 @@ buildscript { apply plugin: 'kotlin' apply plugin: 'java-library' - +apply plugin: 'maven-publish' repositories { // Use JCenter for resolving dependencies. @@ -61,3 +61,23 @@ test { useJUnitPlatform() } +// Top-level build file where you can add configuration options common to all sub-projects/modules. + + +publishing { + repositories { + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/tutipay/java-sdk") + credentials { + username = project.findProperty("gpr.user") ?: System.getenv("USERNAME") + password = project.findProperty("gpr.key") ?: System.getenv("TOKEN") + } + } + } + publications { + gpr(MavenPublication) { + from(components.java) + } + } +}