From ce53f90a8623c668556659ea617e5193ebfa1037 Mon Sep 17 00:00:00 2001 From: Julien Herrero <66303892+julien-herrero-tab@users.noreply.github.com> Date: Wed, 21 Apr 2021 15:01:07 +0200 Subject: [PATCH] Update maven info (#1) * build: update maven publish task * build: update maven publish task for jitpack --- build.gradle | 2 ++ dependencies.gradle | 13 +++++++------ printer/build.gradle | 10 +++++++++- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index cdf190903..0cad0bfb8 100644 --- a/build.gradle +++ b/build.gradle @@ -4,6 +4,7 @@ buildscript { repositories { google() jcenter() + mavenLocal() } dependencies { classpath deps.gradlePlugin.android @@ -43,6 +44,7 @@ allprojects { repositories { google() jcenter() + mavenLocal() maven { url 'https://jitpack.io' } } } diff --git a/dependencies.gradle b/dependencies.gradle index 4101ec33a..aa6728019 100755 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -78,14 +78,15 @@ ext.deps = [ leakCanary : "com.squareup.leakcanary:leakcanary-android:${versions.leakCanaryVersion}", ] -def githubPackagesUser = "tabesto" -def githubPackagesRepo = "tabesto-printer-module" +def githubPackagesUser = "Tabesto" +def githubPackagesRepo = "android-pos-printer-private" ext.artifact = [ - groupId : "com.tabesto", - artifactId : "printer-module", - libraryName : "PrinterModule", - libraryDescription: "Printer Library to use POS printers", +// groupId : "com.tabesto", + groupId : "com.github.Tabesto", + artifactId : "pos-printer", + libraryName : "Android POS Printer", + libraryDescription: "Android Library to use POS printers", githubPackagesPath: "https://maven.pkg.github.com/$githubPackagesUser/$githubPackagesRepo", ] diff --git a/printer/build.gradle b/printer/build.gradle index a619de58c..3ec54ab29 100644 --- a/printer/build.gradle +++ b/printer/build.gradle @@ -6,6 +6,9 @@ apply plugin: 'kotlin-kapt' apply plugin: 'org.jetbrains.dokka' apply from: "$project.rootDir/jacoco.gradle" +group = artifact.groupId +version = appVersionName + android { compileSdkVersion versions.compileSdk buildToolsVersion versions.buildTools @@ -48,6 +51,7 @@ android { } } } + dependencies { api fileTree(dir: "libs", include: ["*.jar"]) implementation fileTree(include: ['*.so'], dir: 'jniLibs') @@ -71,19 +75,23 @@ dependencies { androidTestImplementation deps.test.kotlinxCoroutinesTest kaptAndroidTest deps.injection.daggerCompiler } + task androidSourcesJar(type: Jar) { archiveClassifier.set('sources') from android.sourceSets.main.java.srcDirs } + afterEvaluate { publishing { publications { maven(MavenPublication) { groupId artifact.groupId artifactId artifact.artifactId - version versions.versionName + version appVersionName from components.release artifact androidSourcesJar +// artifact("$buildDir/outputs/aar/${project.getName()}-release.aar") +// artifact bundleReleaseAar pom { name = artifact.libraryName description = artifact.libraryDescription