Implement support for uploading to Artifactory, with proper ProGuard configuration
This commit is contained in:
commit
d38532d5d4
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
# Markwon
|
# 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%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-image-loader%22)
|
||||||
[](http://search.maven.org/#search|ga|1|g%3A%22ru.noties%22%20AND%20a%3A%markwon-view%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 okhttp3.OkHttpClient;
|
||||||
import ru.noties.markwon.il.AsyncDrawableLoader;
|
import ru.noties.markwon.il.AsyncDrawableLoader;
|
||||||
import ru.noties.markwon.spans.AsyncDrawable;
|
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
|
@Module
|
||||||
class AppModule {
|
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 {
|
buildscript {
|
||||||
ext.kotlin_version = '1.2.0'
|
ext.kotlin_version = '1.2.10'
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
jcenter()
|
||||||
google()
|
google()
|
||||||
@ -7,6 +7,8 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
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 {
|
ext {
|
||||||
|
|
||||||
// Config
|
// Config
|
||||||
BUILD_TOOLS = '27.0.1'
|
BUILD_TOOLS = '27.0.1'
|
||||||
TARGET_SDK = 26
|
TARGET_SDK = 26
|
||||||
|
@ -10,6 +10,8 @@ android {
|
|||||||
targetSdkVersion TARGET_SDK
|
targetSdkVersion TARGET_SDK
|
||||||
versionCode 1
|
versionCode 1
|
||||||
versionName version
|
versionName version
|
||||||
|
|
||||||
|
consumerProguardFiles 'lib-proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|
||||||
lintOptions {
|
lintOptions {
|
||||||
@ -19,12 +21,10 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':library')
|
implementation project(':library')
|
||||||
compile ANDROID_SVG
|
implementation ANDROID_SVG
|
||||||
compile ANDROID_GIF
|
implementation ANDROID_GIF
|
||||||
compile OK_HTTP
|
implementation OK_HTTP
|
||||||
}
|
}
|
||||||
|
|
||||||
if (project.hasProperty('release')) {
|
apply from: '../artifactory-mvn-push.gradle'
|
||||||
apply from: 'https://raw.githubusercontent.com/chrisbanes/gradle-mvn-push/master/gradle-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
|
versionCode 1
|
||||||
versionName version
|
versionName version
|
||||||
}
|
}
|
||||||
|
|
||||||
|
libraryVariants.all { variant ->
|
||||||
|
variant.outputs.all {
|
||||||
|
outputFileName = "${POM_ARTIFACT_ID}-release.aar"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile SUPPORT_ANNOTATIONS
|
api SUPPORT_ANNOTATIONS
|
||||||
compile COMMON_MARK
|
implementation COMMON_MARK
|
||||||
compile COMMON_MARK_STRIKETHROUGHT
|
implementation COMMON_MARK_STRIKETHROUGHT
|
||||||
compile COMMON_MARK_TABLE
|
implementation COMMON_MARK_TABLE
|
||||||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
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 {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apply from: '../artifactory-mvn-push.gradle'
|
Loading…
x
Reference in New Issue
Block a user