Skip to content

Commit

Permalink
Update maven info (#1)
Browse files Browse the repository at this point in the history
* build: update maven publish task

* build: update maven publish task for jitpack
  • Loading branch information
julien-herrero-tab authored Apr 21, 2021
1 parent 9188182 commit ce53f90
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ buildscript {
repositories {
google()
jcenter()
mavenLocal()
}
dependencies {
classpath deps.gradlePlugin.android
Expand Down Expand Up @@ -43,6 +44,7 @@ allprojects {
repositories {
google()
jcenter()
mavenLocal()
maven { url 'https://jitpack.io' }
}
}
Expand Down
13 changes: 7 additions & 6 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]

Expand Down
10 changes: 9 additions & 1 deletion printer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -48,6 +51,7 @@ android {
}
}
}

dependencies {
api fileTree(dir: "libs", include: ["*.jar"])
implementation fileTree(include: ['*.so'], dir: 'jniLibs')
Expand All @@ -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
Expand Down

0 comments on commit ce53f90

Please sign in to comment.