Implement artifactory uploading feature for library module
Have defined better the dependencies for 'library', using new gradle options: 'api' and 'implementation'
This commit is contained in:
parent
a6d583dd89
commit
a47048c65b
@ -2,6 +2,8 @@
|
||||
|
||||
# Markwon
|
||||
|
||||

|
||||
|
||||
[](http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%markwon%22)
|
||||
[](http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%markwon-image-loader%22)
|
||||
[](http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%markwon-view%22)
|
||||
|
@ -16,6 +16,9 @@ import okhttp3.Cache;
|
||||
import okhttp3.OkHttpClient;
|
||||
import ru.noties.markwon.il.AsyncDrawableLoader;
|
||||
import ru.noties.markwon.spans.AsyncDrawable;
|
||||
import ru.noties.markwon.spans.configuration.image.ImageConfig;
|
||||
import ru.noties.markwon.spans.configuration.image.ImageGravity;
|
||||
import ru.noties.markwon.spans.configuration.image.ImageWidth;
|
||||
|
||||
@Module
|
||||
class AppModule {
|
||||
|
@ -7,6 +7,8 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.4.12"
|
||||
classpath 'digital.wup:android-maven-publish:3.1.1'
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,7 +31,6 @@ task wrapper(type: Wrapper) {
|
||||
}
|
||||
|
||||
ext {
|
||||
|
||||
// Config
|
||||
BUILD_TOOLS = '27.0.1'
|
||||
TARGET_SDK = 26
|
||||
|
@ -1,6 +1,9 @@
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
apply plugin: 'com.jfrog.artifactory'
|
||||
apply plugin: 'digital.wup.android-maven-publish'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
@ -14,19 +17,67 @@ android {
|
||||
|
||||
consumerProguardFiles 'lib-proguard-rules.pro'
|
||||
}
|
||||
|
||||
libraryVariants.all { variant ->
|
||||
variant.outputs.all {
|
||||
outputFileName = "${POM_ARTIFACT_ID}-release.aar"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile SUPPORT_ANNOTATIONS
|
||||
compile COMMON_MARK
|
||||
compile COMMON_MARK_STRIKETHROUGHT
|
||||
compile COMMON_MARK_TABLE
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
api SUPPORT_ANNOTATIONS
|
||||
implementation COMMON_MARK
|
||||
implementation COMMON_MARK_STRIKETHROUGHT
|
||||
implementation COMMON_MARK_TABLE
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
||||
|
||||
if (project.hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
aar(MavenPublication) {
|
||||
groupId "${GROUP}.auto1"
|
||||
version VERSION_NAME
|
||||
artifactId POM_ARTIFACT_ID
|
||||
|
||||
from components.android
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifactory {
|
||||
contextUrl = artifactory_repository
|
||||
publish {
|
||||
repository {
|
||||
repoKey = 'libs-android-local'
|
||||
|
||||
username = artifactory_username
|
||||
password = artifactory_password
|
||||
}
|
||||
defaults {
|
||||
publications('aar')
|
||||
publishArtifacts = true
|
||||
|
||||
properties = ['qa.level': 'basic', 'q.os': 'android', 'dev.team': 'mobile-android']
|
||||
publishPom = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
|
||||
task cleanBuildPublish {
|
||||
dependsOn 'clean'
|
||||
dependsOn 'assembleRelease'
|
||||
dependsOn 'artifactoryPublish'
|
||||
tasks.findByName('assembleRelease').mustRunAfter 'clean'
|
||||
tasks.findByName('artifactoryPublish').dependsOn 'generatePomFileForAarPublication'
|
||||
tasks.findByName('artifactoryPublish').mustRunAfter 'assembleRelease'
|
||||
}
|
||||
|
||||
cleanBuildPublish
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user