Skip to content

Commit

Permalink
jitpack with gradle 7
Browse files Browse the repository at this point in the history
  • Loading branch information
kai-morich committed Sep 21, 2021
1 parent 70d4f41 commit d319879
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.0'
classpath 'com.android.tools.build:gradle:7.0.2'
}
}

Expand Down
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
jdk:
- openjdk11
install:
- ./gradlew :usbSerialForAndroid:publishToMavenLocal
4 changes: 3 additions & 1 deletion usbSerialExamples/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
apply plugin: 'com.android.application'
plugins {
id 'com.android.application'
}

android {
compileSdkVersion 30
Expand Down
27 changes: 25 additions & 2 deletions usbSerialForAndroid/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
apply plugin: 'com.android.library'
plugins {
id 'com.android.library'
id 'maven-publish'
}

android {
compileSdkVersion 30
Expand Down Expand Up @@ -30,6 +33,26 @@ dependencies {
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'
20 changes: 0 additions & 20 deletions usbSerialForAndroid/publishToMavenLocal.gradle

This file was deleted.

0 comments on commit d319879

Please sign in to comment.