From 89cbbd840c4a5f0cc54609ae7e9f0a35572df502 Mon Sep 17 00:00:00 2001 From: sitraka <53060695+akartis-dev@users.noreply.github.com> Date: Sun, 19 Jun 2022 22:34:56 +0300 Subject: [PATCH] [update]: Graddle7 compatibility --- android/build.gradle | 28 ++++++++++++++-------------- package.json | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index b4da54a..fdbd6bd 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -12,7 +12,7 @@ def DEFAULT_COMPILE_SDK_VERSION = 28 def DEFAULT_BUILD_TOOLS_VERSION = '28.0.3' -def DEFAULT_MIN_SDK_VERSION = 16 +def DEFAULT_MIN_SDK_VERSION = 19 def DEFAULT_TARGET_SDK_VERSION = 28 def safeExtGet(prop, fallback) { @@ -20,7 +20,7 @@ def safeExtGet(prop, fallback) { } apply plugin: 'com.android.library' -apply plugin: 'maven' +apply plugin: 'maven-publish' buildscript { // The Android Gradle plugin is only required when opening the android folder stand-alone. @@ -39,7 +39,7 @@ buildscript { } apply plugin: 'com.android.library' -apply plugin: 'maven' +apply plugin: 'maven-publish' android { compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION) @@ -117,19 +117,20 @@ afterEvaluate { project -> // some Gradle build hooks ref: // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html task androidJavadoc(type: Javadoc) { + configurations.implementation.setCanBeResolved(true) source = android.sourceSets.main.java.srcDirs classpath += files(android.bootClasspath) - classpath += files(project.getConfigurations().getByName('compile').asList()) + classpath += files(project.getConfigurations().getByName('implementation').asList()) include '**/*.java' } task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from androidJavadoc.destinationDir } task androidSourcesJar(type: Jar) { - classifier = 'sources' + archiveClassifier = 'sources' from android.sourceSets.main.java.srcDirs include '**/*.java' } @@ -148,12 +149,11 @@ afterEvaluate { project -> archives androidJavadocJar } - task installArchives(type: Upload) { - configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm - repository url: "file://${projectDir}/../android/maven" - configureReactNativePom pom + publishing { + publications { + maven(MavenPublication) { + artifact androidSourcesJar + } } - } -} + } +} \ No newline at end of file diff --git a/package.json b/package.json index 9632c5b..18a54b9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rn-pdf-generator", - "version": "1.6.4", + "version": "1.6.5", "description": "", "main": "index.js", "scripts": {