From bb9d0869acbb58142f2d5d039d87b227c535ef98 Mon Sep 17 00:00:00 2001 From: Kirill Zhukov Date: Sun, 20 Mar 2022 14:30:39 -0700 Subject: [PATCH 1/2] Update AGP to 7.1.2. AGP 7.1.0 adds maven-publish APIs for making publishing javadocs and sources for Android libraries very easy. We can use that to resolve #32. Changelog: https://developer.android.com/studio/releases/gradle-plugin#versioning-update. --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 6271ac9..81e5d68 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ buildscript { mavenCentral() } dependencies { - classpath("com.android.tools.build:gradle:7.0.4") + classpath("com.android.tools.build:gradle:7.1.2") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") } } From aea8d703e105ecf588f9465da08ddd77a7f2b125 Mon Sep 17 00:00:00 2001 From: Kirill Zhukov Date: Sun, 20 Mar 2022 15:45:01 -0700 Subject: [PATCH 2/2] Enable publishing sources and javadocs for bdk-android. This resolves bitcoindevkit#32. Using new API from AGP 7.1.0 to generate and publish Android sources and javadocs. https://developer.android.com/studio/releases/gradle-plugin#publish-javadoc-jar https://developer.android.com/studio/releases/gradle-plugin#publish-sources-jar --- android/build.gradle.kts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 6c31e9d..eb87810 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -23,6 +23,13 @@ android { proguardFiles(file("proguard-android-optimize.txt"), file("proguard-rules.pro")) } } + + publishing { + singleVariant("release") { + withSourcesJar() + withJavadocJar() + } + } } dependencies {