From 0fae29593972124321f9c95d2329e29c0844f05f Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 28 Nov 2021 10:53:40 -0500 Subject: [PATCH] Update Gradle/AGP --- .jitpack.yml | 4 ++++ build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 3 +-- library/build.gradle | 23 +++++++++++++++++++++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 .jitpack.yml diff --git a/.jitpack.yml b/.jitpack.yml new file mode 100644 index 0000000..4f4d58a --- /dev/null +++ b/.jitpack.yml @@ -0,0 +1,4 @@ +jdk: + - openjdk11 +install: + - ./gradlew build :library:publishToMavenLocal diff --git a/build.gradle b/build.gradle index 67cc7d2..06e5d89 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.0.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 46f1ac6..69a9715 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Jan 03 22:55:02 EST 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/library/build.gradle b/library/build.gradle index 2dc9e24..112542f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -1,5 +1,8 @@ -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' +plugins { + id 'com.android.library' + id 'kotlin-android' + id 'maven-publish' +} android { compileSdkVersion 29 @@ -30,3 +33,19 @@ repositories { mavenCentral() google() } + +task androidSourcesJar(type: Jar) { + classifier 'sources' + from android.sourceSets.main.java.srcDirs +} + +project.afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + artifact androidSourcesJar + } + } + } +}