-
Notifications
You must be signed in to change notification settings - Fork 373
/
Copy pathbuild.gradle
162 lines (142 loc) · 6.56 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
162
/*#######################################################
*
* Maintained 2017-2025 by Gregor Santner <gsantner AT mailbox DOT org>
*
* License of this file: Apache 2.0
* 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 = 18
// 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.14.0"
versionCode 157
multiDexEnabled true
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}\""
buildConfigField "String", "GITMSG", "\"${getGitLastCommitMessage}\""
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 true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
resources {
excludes += ['META-INF/LICENSE-LGPL-2.1.txt', 'META-INF/LICENSE-LGPL-3.txt', 'META-INF/LICENSE-W3C-TEST']
}
}
compileOptions {
encoding = 'UTF-8'
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace 'net.gsantner.markor'
lint {
abortOnError false
disable 'MissingTranslation', 'InvalidPackage', 'ObsoleteLintCustomCheck', 'DefaultLocale', 'UnusedAttribute', 'VectorRaster', 'InflateParams', 'IconLocation', 'UnusedResources', 'TypographyEllipsis'
}
}
dependencies {
// Testing
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.assertj:assertj-core:3.13.1'
// Android standard libs
implementation "androidx.multidex:multidex:2.0.1"
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.6.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'androidx.browser:browser:1.4.0'
// 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}"
implementation "com.vladsch.flexmark:flexmark-ext-admonition:${version_library_flexmark}"
// csv support
// https://opencsv.sourceforge.net/licenses.html License: Apache2
// opencsv 3.10 was the last java-6 version
// opencsv 5.7.1' for java-8 may have dependencies that are not backward compatibility with android-4.1
//noinspection GradleDependency
implementation('com.opencsv:opencsv:3.10') {
// do not get transitive 'commons-beanutils:commons-beanutils as the opencsv bean <-> csv feature is not used
exclude group: 'commons-beanutils', module: 'commons-beanutils'
}
// UI libs
implementation 'com.github.Pixplicity:gene-rate:v1.1.8'
implementation 'com.github.AppIntro:AppIntro:6.2.0'
implementation 'com.github.mertakdut:EpubParser:1.0.95'
implementation 'com.github.martin-stone:hsv-alpha-color-picker-android:3.1.0'
// Tool libraries
//noinspection AnnotationProcessorOnCompilePath
implementation 'commons-io:commons-io:2.7'
if (enable_plugin_kotlin) {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${version_plugin_kotlin}"
}
// Processors
def anpros = []
for (anpro in anpros) {
if (enable_plugin_kotlin) {
kapt anpro
} else {
annotationProcessor anpro
}
}
}