Implement support for uploading to Artifactory, with proper ProGuard configuration
This commit is contained in:
commit
d38532d5d4
@ -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)
|
||||
|
5
app/proguard.pro
vendored
5
app/proguard.pro
vendored
@ -1,5 +0,0 @@
|
||||
-dontwarn okhttp3.**
|
||||
-dontwarn okio.**
|
||||
|
||||
-keep class com.caverock.androidsvg.** { *; }
|
||||
-dontwarn com.caverock.androidsvg.**
|
@ -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 {
|
||||
|
44
artifactory-mvn-push.gradle
Normal file
44
artifactory-mvn-push.gradle
Normal file
@ -0,0 +1,44 @@
|
||||
apply plugin: 'com.jfrog.artifactory'
|
||||
apply plugin: 'digital.wup.android-maven-publish'
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
aar(MavenPublication) {
|
||||
groupId "${GROUP}.auto1"
|
||||
version VERSION_NAME
|
||||
artifactId POM_ARTIFACT_ID
|
||||
|
||||
from components.android
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifactory {
|
||||
contextUrl = artifactory_repository_url
|
||||
publish {
|
||||
repository {
|
||||
repoKey = artifactory_repository_name
|
||||
|
||||
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'
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.0'
|
||||
ext.kotlin_version = '1.2.10'
|
||||
repositories {
|
||||
jcenter()
|
||||
google()
|
||||
@ -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
|
||||
|
@ -10,6 +10,8 @@ android {
|
||||
targetSdkVersion TARGET_SDK
|
||||
versionCode 1
|
||||
versionName version
|
||||
|
||||
consumerProguardFiles 'lib-proguard-rules.pro'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -19,12 +21,10 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':library')
|
||||
compile ANDROID_SVG
|
||||
compile ANDROID_GIF
|
||||
compile OK_HTTP
|
||||
implementation project(':library')
|
||||
implementation ANDROID_SVG
|
||||
implementation ANDROID_GIF
|
||||
implementation OK_HTTP
|
||||
}
|
||||
|
||||
if (project.hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
|
||||
}
|
||||
apply from: '../artifactory-mvn-push.gradle'
|
5
library-image-loader/lib-proguard-rules.pro
Normal file
5
library-image-loader/lib-proguard-rules.pro
Normal file
@ -0,0 +1,5 @@
|
||||
-dontwarn okhttp3.**
|
||||
-dontwarn okio.**
|
||||
|
||||
-keep class com.caverock.androidsvg.** { *; }
|
||||
-dontwarn com.caverock.androidsvg.**
|
@ -12,19 +12,24 @@ android {
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
apply from: '../artifactory-mvn-push.gradle'
|
Loading…
x
Reference in New Issue
Block a user