Update gradle build configuration
This commit is contained in:
parent
bd27f99f8e
commit
0ec683ad48
@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
applicationId "ru.noties.markwon"
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
setProperty("archivesBaseName", "markwon-sample-$versionName")
|
||||
@ -32,14 +32,16 @@ dependencies {
|
||||
implementation project(':library-image-loader')
|
||||
implementation project(':library-syntax')
|
||||
|
||||
implementation 'ru.noties:debug:3.0.0@jar'
|
||||
implementation 'me.saket:better-link-movement-method:2.2.0'
|
||||
|
||||
implementation OK_HTTP
|
||||
|
||||
implementation 'com.google.dagger:dagger:2.10'
|
||||
annotationProcessor 'com.google.dagger:dagger-compiler:2.10'
|
||||
|
||||
implementation PRISM_4J
|
||||
annotationProcessor PRISM_4J_BUNDLER
|
||||
deps.with {
|
||||
implementation it['okhttp']
|
||||
implementation it['prism4j']
|
||||
implementation it['debug']
|
||||
implementation it['better-link-movement']
|
||||
implementation it['dagger']
|
||||
}
|
||||
|
||||
deps['annotationProcessor'].with {
|
||||
annotationProcessor it['prism4j-bundler']
|
||||
annotationProcessor it['dagger-compiler']
|
||||
}
|
||||
}
|
||||
|
45
build.gradle
45
build.gradle
@ -44,23 +44,40 @@ ext {
|
||||
TARGET_SDK = 27
|
||||
MIN_SDK = 16
|
||||
|
||||
// Dependencies
|
||||
config = [
|
||||
'build-tools' : '27.0.3',
|
||||
'compile-sdk' : 27,
|
||||
'target-sdk' : 27,
|
||||
'min-sdk' : 16,
|
||||
'push-aar-gradle': 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
]
|
||||
|
||||
final def supportVersion = '27.1.1'
|
||||
SUPPORT_ANNOTATIONS = "com.android.support:support-annotations:$supportVersion"
|
||||
SUPPORT_APP_COMPAT = "com.android.support:appcompat-v7:$supportVersion"
|
||||
|
||||
final def commonMarkVersion = '0.11.0'
|
||||
COMMON_MARK = "com.atlassian.commonmark:commonmark:$commonMarkVersion"
|
||||
COMMON_MARK_STRIKETHROUGHT = "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:$commonMarkVersion"
|
||||
COMMON_MARK_TABLE = "com.atlassian.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion"
|
||||
final def daggerVersion = '2.10'
|
||||
|
||||
ANDROID_SVG = 'com.caverock:androidsvg:1.2.1'
|
||||
ANDROID_GIF = 'pl.droidsonroids.gif:android-gif-drawable:1.2.14'
|
||||
OK_HTTP = 'com.squareup.okhttp3:okhttp:3.9.0'
|
||||
deps = [
|
||||
'support-annotations' : "com.android.support:support-annotations:$supportVersion",
|
||||
'support-app-compat' : "com.android.support:appcompat-v7:$supportVersion",
|
||||
'commonmark' : "com.atlassian.commonmark:commonmark:$commonMarkVersion",
|
||||
'commonmark-strikethrough': "com.atlassian.commonmark:commonmark-ext-gfm-strikethrough:$commonMarkVersion",
|
||||
'commonmark-table' : "com.atlassian.commonmark:commonmark-ext-gfm-tables:$commonMarkVersion",
|
||||
'android-svg' : 'com.caverock:androidsvg:1.2.1',
|
||||
'android-gif' : 'pl.droidsonroids.gif:android-gif-drawable:1.2.14',
|
||||
'okhttp' : 'com.squareup.okhttp3:okhttp:3.9.0',
|
||||
'prism4j' : 'ru.noties:prism4j:1.1.0',
|
||||
'debug' : 'ru.noties:debug:3.0.0@jar',
|
||||
'better-link-movement' : 'me.saket:better-link-movement-method:2.2.0',
|
||||
'dagger' : "com.google.dagger:dagger:$daggerVersion"
|
||||
]
|
||||
|
||||
PRISM_4J = 'ru.noties:prism4j:1.1.0'
|
||||
PRISM_4J_BUNDLER = 'ru.noties:prism4j-bundler:1.1.0'
|
||||
deps['annotationProcessor'] = [
|
||||
'prism4j-bundler': 'ru.noties:prism4j-bundler:1.1.0',
|
||||
'dagger-compiler': "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
]
|
||||
|
||||
JUNIT = 'junit:junit:4.12'
|
||||
ROBOLECTRIC = 'org.robolectric:robolectric:3.8'
|
||||
deps['test'] = [
|
||||
'junit' : 'junit:junit:4.12',
|
||||
'robolectric': 'org.robolectric:robolectric:3.8'
|
||||
]
|
||||
}
|
||||
|
@ -2,19 +2,22 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api SUPPORT_ANNOTATIONS
|
||||
|
||||
deps.with {
|
||||
api it['support-annotations']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -22,11 +25,6 @@ afterEvaluate {
|
||||
generateReleaseBuildConfig.enabled = false
|
||||
}
|
||||
|
||||
// todo: remove `local` check after merge with latest version (1.1.1)
|
||||
if (hasProperty('release')) {
|
||||
if (hasProperty('local')) {
|
||||
ext.RELEASE_REPOSITORY_URL = LOCAL_MAVEN_URL
|
||||
ext.SNAPSHOT_REPOSITORY_URL = LOCAL_MAVEN_URL
|
||||
}
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
3
html-parser-api/gradle.properties
Normal file
3
html-parser-api/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
||||
POM_NAME=Markwon
|
||||
POM_ARTIFACT_ID=markwon-html-parser-api
|
||||
POM_PACKAGING=aar
|
@ -37,7 +37,7 @@ public interface HtmlTag {
|
||||
Map<String, String> attributes();
|
||||
|
||||
/**
|
||||
* Represents <em>really</em> inline HTML tags (unline commonmark definitions)
|
||||
* Represents <em>really</em> inline HTML tags (unlile commonmark definitions)
|
||||
*/
|
||||
interface Inline extends HtmlTag {
|
||||
}
|
||||
|
@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
@ -15,11 +15,16 @@ android {
|
||||
|
||||
dependencies {
|
||||
|
||||
api SUPPORT_ANNOTATIONS
|
||||
api project(':html-parser-api')
|
||||
|
||||
testImplementation JUNIT
|
||||
testImplementation ROBOLECTRIC
|
||||
deps.with {
|
||||
api it['support-annotations']
|
||||
}
|
||||
|
||||
deps.test.with {
|
||||
testImplementation it['junit']
|
||||
testImplementation it['robolectric']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -27,11 +32,6 @@ afterEvaluate {
|
||||
generateReleaseBuildConfig.enabled = false
|
||||
}
|
||||
|
||||
// todo: remove `local` check after merge with latest version (1.1.1)
|
||||
if (hasProperty('release')) {
|
||||
if (hasProperty('local')) {
|
||||
ext.RELEASE_REPOSITORY_URL = LOCAL_MAVEN_URL
|
||||
ext.SNAPSHOT_REPOSITORY_URL = LOCAL_MAVEN_URL
|
||||
}
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
3
html-parser-impl/gradle.properties
Normal file
3
html-parser-impl/gradle.properties
Normal file
@ -0,0 +1,3 @@
|
||||
POM_NAME=Markwon
|
||||
POM_ARTIFACT_ID=markwon-html-parser-impl
|
||||
POM_PACKAGING=aar
|
@ -23,7 +23,7 @@ public class HtmlEmptyTagReplacement {
|
||||
|
||||
/**
|
||||
* @return replacement for supplied startTag or null if no replacement should occur (which will
|
||||
* lead to `Inline` tag have start & end the same value, thus not applicable for applying a Span)
|
||||
* lead to `Inline` tag have start & end the same value, thus not applicable for applying a Span)
|
||||
*/
|
||||
@Nullable
|
||||
public String replace(@NonNull Token.StartTag startTag) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ru.noties.markwon.html;
|
||||
package ru.noties.markwon.html.impl;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
@ -2,12 +2,12 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
@ -19,10 +19,14 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
api project(':library')
|
||||
api ANDROID_SVG
|
||||
api ANDROID_GIF
|
||||
api OK_HTTP
|
||||
|
||||
deps.with {
|
||||
api it['android-svg']
|
||||
api it['android-gif']
|
||||
api it['okhttp']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -30,5 +34,5 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
if (hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
@ -2,21 +2,25 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api SUPPORT_ANNOTATIONS
|
||||
api PRISM_4J
|
||||
|
||||
api project(':library')
|
||||
|
||||
deps.with {
|
||||
api it['support-annotations']
|
||||
api it['prism4j']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -24,5 +28,5 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
if (hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
@ -2,20 +2,24 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
api project(':library')
|
||||
compileOnly SUPPORT_APP_COMPAT
|
||||
|
||||
deps.with {
|
||||
compileOnly it['support-app-compat']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -23,5 +27,5 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
if (hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
@ -2,22 +2,25 @@ apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion MIN_SDK
|
||||
targetSdkVersion TARGET_SDK
|
||||
minSdkVersion config['min-sdk']
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api SUPPORT_ANNOTATIONS
|
||||
api COMMON_MARK
|
||||
api COMMON_MARK_STRIKETHROUGHT
|
||||
api COMMON_MARK_TABLE
|
||||
|
||||
deps.with {
|
||||
api it['support-annotations']
|
||||
api it['commonmark']
|
||||
api it['commonmark-strikethrough']
|
||||
api it['commonmark-table']
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
@ -25,5 +28,5 @@ afterEvaluate {
|
||||
}
|
||||
|
||||
if (hasProperty('release')) {
|
||||
apply from: 'https://raw.githubusercontent.com/noties/gradle-mvn-push/master/gradle-mvn-push-aar.gradle'
|
||||
apply from: config['push-aar-gradle']
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
|
||||
compileSdkVersion TARGET_SDK
|
||||
buildToolsVersion BUILD_TOOLS
|
||||
compileSdkVersion config['compile-sdk']
|
||||
buildToolsVersion config['build-tools']
|
||||
|
||||
defaultConfig {
|
||||
|
||||
@ -11,7 +11,7 @@ android {
|
||||
|
||||
// using 21 as minimum only to be able to vector assets
|
||||
minSdkVersion 21
|
||||
targetSdkVersion TARGET_SDK
|
||||
targetSdkVersion config['target-sdk']
|
||||
versionCode 1
|
||||
versionName version
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user