1
0
mirror of https://github.com/mik3y/usb-serial-for-android synced 2025-06-07 16:06:10 +00:00

jitpack with gradle 7

This commit is contained in:
kai-morich 2021-09-21 20:38:32 +02:00
parent 70d4f41268
commit d319879386
5 changed files with 31 additions and 24 deletions

View File

@ -6,7 +6,7 @@ buildscript {
google() google()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:7.0.0' classpath 'com.android.tools.build:gradle:7.0.2'
} }
} }

View File

@ -1,2 +1,4 @@
jdk: jdk:
- openjdk11 - openjdk11
install:
- ./gradlew :usbSerialForAndroid:publishToMavenLocal

View File

@ -1,4 +1,6 @@
apply plugin: 'com.android.application' plugins {
id 'com.android.application'
}
android { android {
compileSdkVersion 30 compileSdkVersion 30

View File

@ -1,4 +1,7 @@
apply plugin: 'com.android.library' plugins {
id 'com.android.library'
id 'maven-publish'
}
android { android {
compileSdkVersion 30 compileSdkVersion 30
@ -30,6 +33,26 @@ dependencies {
androidTestImplementation 'org.apache.commons:commons-lang3:3.11' androidTestImplementation 'org.apache.commons:commons-lang3:3.11'
} }
//apply from: 'publishToMavenLocal.gradle' // gradle task: publishToMavenLocal
project.afterEvaluate {
publishing {
publications {
release(MavenPublication) {
from components.release
artifact androidSourcesJar
// values used for local maven repo, jitpack uses github release:
groupId 'com.github.mik3y'
artifactId 'usb-serial-for-android'
version 'v3.5.0beta'
}
}
}
}
task androidSourcesJar(type: Jar) {
classifier 'sources'
from android.sourceSets.main.java.srcDirs
}
//apply from: 'coverage.gradle' //apply from: 'coverage.gradle'

View File

@ -1,20 +0,0 @@
apply plugin: 'maven-publish'
publishing {
publications {
maven(MavenPublication) {
groupId 'com.github.mik3y'
artifactId 'usb-serial-for-android'
version '3.0.0beta'
afterEvaluate {
artifact androidSourcesJar
artifact bundleReleaseAar
}
}
}
}
task androidSourcesJar(type: Jar) {
classifier 'sources'
from android.sourceSets.main.java.srcDirs
}