From 53ddaddfc2ad8dce6319411c9aafb8c81ec260a9 Mon Sep 17 00:00:00 2001 From: Riccardo Lattarulo Date: Wed, 8 Dec 2021 22:34:42 +0100 Subject: [PATCH] Add maven-publish plugin --- TimelineView/build.gradle | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/TimelineView/build.gradle b/TimelineView/build.gradle index 12e715e..0042427 100644 --- a/TimelineView/build.gradle +++ b/TimelineView/build.gradle @@ -1,6 +1,36 @@ plugins { id 'com.android.library' id 'kotlin-android' + id 'maven-publish' +} + + +// Because the components are created only during the afterEvaluate phase, you must +// configure your publications using the afterEvaluate() lifecycle method. +afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = 'com.lriccardo.timelineview' + artifactId = 'timelineview' + version = '1.0.0' + } + // Creates a Maven publication called “debug”. + debug(MavenPublication) { + // Applies the component for the debug build variant. + from components.debug + + groupId = 'com.lriccardo.timelineview' + artifactId = 'timelineview' + version = '1.0.0' + } + } + } } android {