diff --git a/build.gradle b/build.gradle index 3e0ec6e..74992ec 100644 --- a/build.gradle +++ b/build.gradle @@ -7,15 +7,17 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.5.2' + classpath 'com.android.tools.build:gradle:4.1.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.novoda:bintray-release:0.9.1' - // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } +plugins { + id 'maven-publish' +} + allprojects { repositories { google() diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f4d7b2b..186b715 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/imageviewer/build.gradle b/imageviewer/build.gradle index 32ebb05..aa10784 100644 --- a/imageviewer/build.gradle +++ b/imageviewer/build.gradle @@ -1,6 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' -apply plugin: 'com.novoda.bintray-release' +apply plugin: 'maven-publish' android { compileSdkVersion 29 @@ -11,16 +11,31 @@ android { versionCode 1 versionName "1.0" } -} -publish { - userOrg = 'troy379' - groupId = 'com.github.stfalcon' - artifactId = 'stfalcon-imageviewer' - publishVersion = '1.0.1' - desc = 'A customizable full-screen image viewer with shared image transition support, "pinch to zoom" and "swipe to dismiss" gestures.' - uploadName='StfalconImageViewer' - website = 'https://github.com/stfalcon-studio/StfalconImageViewer' + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } + + afterEvaluate { + publishing { + publications { + // Creates a Maven publication called "release". + release(MavenPublication) { + // Applies the component for the release build variant. + from components.release + + // You can then customize attributes of the publication as shown below. + groupId = 'com.github.stfalcon' + artifactId = 'stfalcon-imageviewer' + version = '1.0.1' + } + } + } + } + } dependencies { @@ -32,6 +47,8 @@ dependencies { repositories { maven { url "https://jitpack.io" } + mavenCentral() + google() } // Avoid Kotlin docs error @@ -43,4 +60,4 @@ tasks.withType(Javadoc) { task javadoc(type: Javadoc) { source = android.sourceSets.main.java.srcDirs classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) -} \ No newline at end of file +}