Skip to content

Commit

Permalink
add maven-publish plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
bevzaanton committed Aug 11, 2021
1 parent d11578f commit 8548af6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 15 deletions.
8 changes: 5 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
39 changes: 28 additions & 11 deletions imageviewer/build.gradle
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 {
Expand All @@ -32,6 +47,8 @@ dependencies {

repositories {
maven { url "https://jitpack.io" }
mavenCentral()
google()
}

// Avoid Kotlin docs error
Expand All @@ -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))
}
}

0 comments on commit 8548af6

Please sign in to comment.