forked from gsantner/markor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
161 lines (143 loc) · 6.64 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
/*#######################################################
*
* Maintained by Gregor Santner, 2017-
* https://gsantner.net/
*
* License of this file: Apache 2.0 (Commercial upon request)
* https://www.apache.org/licenses/LICENSE-2.0
*
#########################################################*/
apply plugin: 'com.android.application'
if (enable_plugin_kotlin) {
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
}
rootProject.ext.version_minSdk = 16
// https://github.com/vsch/flexmark-java/releases
ext.version_library_flexmark = "0.42.14"
android {
buildToolsVersion rootProject.ext.version_buildTools
compileSdkVersion rootProject.ext.version_compileSdk
defaultConfig {
resValue "string", "manifest_package_id", "net.gsantner.markor"
applicationId "net.gsantner.markor"
versionName "2.8.3"
versionCode 127
minSdkVersion rootProject.ext.version_minSdk
targetSdkVersion rootProject.ext.version_compileSdk
buildConfigField "boolean", "IS_TEST_BUILD", "false"
buildConfigField "boolean", "IS_GPLAY_BUILD", "false"
buildConfigField "String[]", "DETECTED_ANDROID_LOCALES", "${findUsedAndroidLocales()}"
buildConfigField "String", "BUILD_DATE", "\"${getBuildDate()}\""
buildConfigField "String", "GITHASH", "\"${getGitHash()}\""
setProperty("archivesBaseName", applicationId + "-v" + versionCode + "-" + versionName)
}
flavorDimensions "default"
productFlavors {
flavorAtest {
applicationId "net.gsantner.markor_test"
versionCode = Integer.parseInt(new Date().format('yyMMdd'))
versionName = defaultConfig.versionName + "-" + new Date().format('HHmm')
buildConfigField "boolean", "IS_TEST_BUILD", "true"
}
flavorDefault {
}
flavorGplay {
buildConfigField "boolean", "IS_GPLAY_BUILD", "true"
}
}
sourceSets {
main { assets.srcDirs = ['src/main/assets'] }
if (enable_plugin_kotlin) {
main.java.srcDirs += 'src/main/kotlin'
}
main.java.srcDirs += 'thirdparty/java'
main.res.srcDirs += 'thirdparty/res'
main.assets.srcDirs += 'thirdparty/assets'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'com.android.support') {
if (details.requested.name != 'multidex' && details.requested.name != 'multidex-instrumentation') {
details.useVersion "${rootProject.ext.version_library_appcompat}"
}
}
}
}
}
packagingOptions {
exclude 'META-INF/LICENSE-LGPL-2.1.txt'
exclude 'META-INF/LICENSE-LGPL-3.txt'
exclude 'META-INF/LICENSE-W3C-TEST'
}
compileOptions {
encoding = 'UTF-8'
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
lintOptions {
disable 'MissingTranslation', 'InvalidPackage', 'ObsoleteLintCustomCheck', 'DefaultLocale', 'UnusedAttribute', 'VectorRaster', 'InflateParams', 'IconLocation', 'UnusedResources', 'TypographyEllipsis'
abortOnError false
}
}
dependencies {
// Testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.assertj:assertj-core:3.13.1'
// Android standard libs
implementation "com.android.support:appcompat-v7:${version_library_appcompat}"
implementation "com.android.support:design:${version_library_appcompat}"
implementation "com.android.support:support-v4:${version_library_appcompat}"
implementation "com.android.support:recyclerview-v7:${version_library_appcompat}"
implementation "com.android.support:palette-v7:${version_library_appcompat}"
implementation "com.android.support:preference-v7:${version_library_appcompat}"
implementation "com.android.support:preference-v14:${version_library_appcompat}"
implementation "com.android.support:customtabs:${version_library_appcompat}"
// Markdown convertor (Flexmark)
implementation "com.vladsch.flexmark:flexmark:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-util:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-emoji:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-gfm-tasklist:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-superscript:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-autolink:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-toc:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-tables:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-jekyll-front-matter:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-jekyll-tag:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-anchorlink:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-gfm-strikethrough:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-yaml-front-matter:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-footnotes:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-gitlab:${version_library_flexmark}"
implementation "com.vladsch.flexmark:flexmark-ext-typographic:${version_library_flexmark}"
// UI libs
implementation 'com.pixplicity.generate:library:1.1.8'
implementation 'com.github.AppIntro:AppIntro:4.2.3'
implementation 'com.kailashdabhi:om-recorder:1.1.5'
implementation 'com.github.mertakdut:EpubParser:1.0.95'
implementation project(':app:thirdparty-lib-src:QuadFlask-colorpicker')
// Tool libraries
//noinspection AnnotationProcessorOnCompilePath
implementation "com.jakewharton:butterknife:${version_library_butterknife}"
implementation 'commons-io:commons-io:2.7'
if (enable_plugin_kotlin) {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${version_plugin_kotlin}"
}
// Processors
def anpros = ["com.jakewharton:butterknife-compiler:${version_library_butterknife}"]
for (anpro in anpros) {
if (enable_plugin_kotlin) {
kapt anpro
} else {
annotationProcessor anpro
}
}
}