119 lines
3.2 KiB
Groovy
119 lines
3.2 KiB
Groovy
apply plugin: 'com.android.application'
|
|
apply plugin: 'kotlin-android'
|
|
apply plugin: 'kotlin-kapt'
|
|
apply plugin: 'kotlin-android-extensions'
|
|
|
|
def gitSha = { ->
|
|
def output = new ByteArrayOutputStream()
|
|
exec {
|
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
|
standardOutput = output
|
|
}
|
|
return output.toString().trim()
|
|
}.memoize()
|
|
|
|
android {
|
|
|
|
compileSdkVersion config['compile-sdk']
|
|
buildToolsVersion config['build-tools']
|
|
|
|
defaultConfig {
|
|
applicationId 'io.noties.markwon.app'
|
|
minSdkVersion 23
|
|
targetSdkVersion config['target-sdk']
|
|
versionCode 1
|
|
versionName version
|
|
|
|
resConfig 'en'
|
|
|
|
setProperty("archivesBaseName", "markwon")
|
|
|
|
buildConfigField 'String', 'GIT_SHA', "\"${gitSha()}\""
|
|
buildConfigField 'String', 'GIT_REPOSITORY', '"https://github.com/noties/Markwon"'
|
|
|
|
final def scheme = 'markwon'
|
|
buildConfigField 'String', 'DEEPLINK_SCHEME', "\"$scheme\""
|
|
manifestPlaceholders += [
|
|
'deeplink_scheme': scheme
|
|
]
|
|
}
|
|
|
|
dexOptions {
|
|
preDexLibraries true
|
|
javaMaxHeapSize '5g'
|
|
}
|
|
|
|
compileOptions {
|
|
targetCompatibility JavaVersion.VERSION_11
|
|
sourceCompatibility JavaVersion.VERSION_11
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java.srcDirs += '../sample-utils/annotations'
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
kapt {
|
|
arguments {
|
|
arg('markwon.samples.file', "${projectDir}/samples.json".toString())
|
|
}
|
|
}
|
|
|
|
androidExtensions {
|
|
features = ["parcelize"]
|
|
}
|
|
|
|
configurations.all {
|
|
exclude group: 'org.jetbrains', module: 'annotations-java5'
|
|
}
|
|
|
|
dependencies {
|
|
kapt project(':sample-utils:processor')
|
|
deps['annotationProcessor'].with {
|
|
kapt it['prism4j-bundler']
|
|
}
|
|
|
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
|
|
implementation project(':markwon-core')
|
|
implementation project(':markwon-editor')
|
|
implementation project(':markwon-ext-latex')
|
|
implementation project(':markwon-ext-strikethrough')
|
|
implementation project(':markwon-ext-tables')
|
|
implementation project(':markwon-ext-tasklist')
|
|
implementation project(':markwon-html')
|
|
implementation project(':markwon-image')
|
|
implementation project(':markwon-linkify')
|
|
implementation project(':markwon-recycler')
|
|
implementation project(':markwon-recycler-table')
|
|
implementation project(':markwon-simple-ext')
|
|
implementation project(':markwon-syntax-highlight')
|
|
|
|
implementation project(':markwon-image-picasso')
|
|
implementation project(':markwon-image-glide')
|
|
implementation project(':markwon-image-coil')
|
|
|
|
deps.with {
|
|
// implementation it['x-appcompat']
|
|
implementation it['x-recycler-view']
|
|
implementation it['x-cardview']
|
|
implementation it['x-fragment']
|
|
implementation it['okhttp']
|
|
implementation it['prism4j']
|
|
implementation it['gson']
|
|
implementation it['adapt']
|
|
implementation it['debug']
|
|
implementation it['android-svg']
|
|
implementation it['android-gif-impl']
|
|
implementation it['coil']
|
|
}
|
|
|
|
deps['test'].with {
|
|
testImplementation it['junit']
|
|
testImplementation it['robolectric']
|
|
testImplementation it['mockito']
|
|
}
|
|
} |