91 lines
2.9 KiB
Groovy
91 lines
2.9 KiB
Groovy
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
google()
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:3.0.1'
|
|
classpath 'com.github.ben-manes:gradle-versions-plugin:0.20.0'
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
if (project.hasProperty('LOCAL_MAVEN_URL')) {
|
|
maven { url LOCAL_MAVEN_URL }
|
|
}
|
|
jcenter()
|
|
google()
|
|
}
|
|
version = VERSION_NAME
|
|
group = GROUP
|
|
}
|
|
|
|
task clean(type: Delete) {
|
|
delete rootProject.buildDir
|
|
}
|
|
|
|
task wrapper(type: Wrapper) {
|
|
gradleVersion '4.8.1'
|
|
distributionType 'all'
|
|
}
|
|
|
|
if (hasProperty('local')) {
|
|
if (!hasProperty('LOCAL_MAVEN_URL')) {
|
|
throw new RuntimeException('Cannot publish to local maven as no such property exists: LOCAL_MAVEN_URL')
|
|
}
|
|
ext.RELEASE_REPOSITORY_URL = LOCAL_MAVEN_URL
|
|
ext.SNAPSHOT_REPOSITORY_URL = LOCAL_MAVEN_URL
|
|
}
|
|
|
|
ext {
|
|
|
|
// Config
|
|
BUILD_TOOLS = '27.0.3'
|
|
TARGET_SDK = 27
|
|
MIN_SDK = 16
|
|
|
|
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'
|
|
final def commonMarkVersion = '0.11.0'
|
|
final def daggerVersion = '2.10'
|
|
|
|
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"
|
|
]
|
|
|
|
deps['annotationProcessor'] = [
|
|
'prism4j-bundler': 'ru.noties:prism4j-bundler:1.1.0',
|
|
'dagger-compiler': "com.google.dagger:dagger-compiler:$daggerVersion"
|
|
]
|
|
|
|
deps['test'] = [
|
|
'junit' : 'junit:junit:4.12',
|
|
'robolectric': 'org.robolectric:robolectric:3.8',
|
|
'ix-java' : 'com.github.akarnokd:ixjava:1.0.0'
|
|
]
|
|
}
|
|
|
|
task checkUpdates {
|
|
apply plugin: 'com.github.ben-manes.versions'
|
|
dependsOn 'dependencyUpdates'
|
|
}
|