From 5ef111cd40dd595c8831854da0106a37fa750784 Mon Sep 17 00:00:00 2001 From: tiefensuche <10889432+tiefensuche@users.noreply.github.com> Date: Tue, 4 Apr 2023 23:51:15 +0200 Subject: [PATCH] Configure github package publish --- plugin/build.gradle | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/plugin/build.gradle b/plugin/build.gradle index afcc8c7..4039a8c 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -4,6 +4,7 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' } android { @@ -16,10 +17,9 @@ android { versionName "0.1" } - buildTypes { - release { - minifyEnabled true - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + publishing { + singleVariant("release") { + withSourcesJar() } } } @@ -35,3 +35,27 @@ repositories { google() mavenCentral() } + +publishing { + publications { + release(MavenPublication) { + groupId = "com.tiefensuche.soundcrowd" + artifactId = "plugin" + version = "0.1" + + afterEvaluate { + from(components["release"]) + } + } + } + + repositories { + maven { + url = uri("https://maven.pkg.github.com/soundcrowd/soundcrowd-plugin") + credentials { + username = System.getenv("USERNAME") + password = System.getenv("TOKEN") + } + } + } +}