forked from Ashinch/ReadYou
/
build.gradle
194 lines (166 loc) · 7.26 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
plugins {
id "com.android.application"
id "org.jetbrains.kotlin.android"
id "kotlin-kapt"
id "dagger.hilt.android.plugin"
id "androidx.navigation.safeargs.kotlin"
}
def gitCommitHash = "git rev-parse --verify --short HEAD".execute().text.trim()
def keyProps = new Properties()
def keyPropsFile = rootProject.file("signature/keystore.properties")
if (keyPropsFile.exists()) {
println("Loading keystore properties from ${keyPropsFile.absolutePath}")
keyProps.load(new FileInputStream(keyPropsFile))
}
android {
compileSdk 33
defaultConfig {
applicationId "me.ash.reader"
minSdk 26
targetSdk 33
versionCode 19
versionName "0.9.8"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation": "$projectDir/schemas".toString(),
"room.incremental" : "true"
]
}
}
}
flavorDimensions "channel"
productFlavors {
fdroid {
dimension "channel"
}
github {
dimension "channel"
}
}
signingConfigs {
release {
keyAlias keyProps["keyAlias"]
keyPassword keyProps["keyPassword"]
storeFile keyProps["storeFile"] ? file(keyProps["storeFile"]) : null
storePassword keyProps["storePassword"]
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFileName = "ReadYou-${defaultConfig.versionName}-${gitCommitHash}.apk"
}
}
kotlinOptions {
freeCompilerArgs = freeCompilerArgs + "-opt-in=kotlin.RequiresOptIn"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose
}
packagingOptions {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
namespace 'me.ash.reader'
}
dependencies {
implementation "com.github.ireward:compose-html:1.0.2"
// http://bigbadaboom.github.io/androidsvg/release_notes.html
implementation "com.caverock:androidsvg-aar:$androidSVG"
// https://github.com/mdewilde/opml-parser
implementation "be.ceau:opml-parser:$opmlParser"
// https://github.com/dankito/Readability4J
implementation "net.dankito.readability4j:readability4j:$readability4j"
// https://mvnrepository.com/artifact/com.rometools/rome
implementation "com.rometools:rome:$rome"
// https://coil-kt.github.io/coil/changelog/
implementation("io.coil-kt:coil-base:$coil")
implementation("io.coil-kt:coil-compose:$coil")
implementation("io.coil-kt:coil-svg:$coil")
implementation("io.coil-kt:coil-gif:$coil")
// Cancel TLSv1.3 support pre Android10
// implementation 'org.conscrypt:conscrypt-android:2.5.2'
// https://square.github.io/okhttp/changelogs/changelog/
implementation "com.squareup.okhttp3:okhttp:$okhttp"
implementation "com.squareup.okhttp3:okhttp-coroutines-jvm:$okhttp"
implementation "com.squareup.retrofit2:retrofit:$retrofit2"
implementation "com.squareup.retrofit2:converter-gson:$retrofit2"
// https://developer.android.com/jetpack/androidx/releases/profileinstaller
implementation "androidx.profileinstaller:profileinstaller:$profileinstaller"
// https://developer.android.com/jetpack/androidx/releases/work
implementation "androidx.work:work-runtime-ktx:$work"
// https://developer.android.com/jetpack/androidx/releases/datastore
implementation "androidx.datastore:datastore-preferences:$datastore"
// https://developer.android.com/jetpack/androidx/releases/room
implementation "androidx.room:room-paging:$room"
implementation "androidx.room:room-common:$room"
implementation "androidx.room:room-ktx:$room"
kapt "androidx.room:room-compiler:$room"
// https://developer.android.com/jetpack/androidx/releases/paging
implementation "androidx.paging:paging-common:$paging"
implementation "androidx.paging:paging-runtime:$paging"
implementation "androidx.paging:paging-compose:1.0.0-alpha14"
// https://developer.android.com/jetpack/androidx/releases/paging
implementation "androidx.browser:browser:1.5.0"
// https://developer.android.com/jetpack/androidx/releases/navigation
implementation "androidx.navigation:navigation-compose:$navigation"
// https://developer.android.com/jetpack/androidx/releases/lifecycle
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle"
// https://developer.android.com/jetpack/androidx/releases/compose-material3
implementation "androidx.compose.material3:material3:$material3"
// https://github.com/google/accompanist/releases
implementation "com.google.accompanist:accompanist-insets:$accompanist"
implementation "com.google.accompanist:accompanist-systemuicontroller:$accompanist"
implementation "com.google.accompanist:accompanist-pager:$accompanist"
implementation "com.google.accompanist:accompanist-flowlayout:$accompanist"
implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist"
implementation "com.google.accompanist:accompanist-swiperefresh:$accompanist"
// https://developer.android.com/jetpack/androidx/releases/compose-animation
implementation "androidx.compose.animation:animation-graphics:$compose"
// https://developer.android.com/jetpack/androidx/releases/compose-ui
implementation "androidx.compose.ui:ui:$compose"
implementation "androidx.compose.ui:ui-util:$compose"
// https://developer.android.com/jetpack/androidx/releases/compose-material
implementation "androidx.compose.material:material:$compose"
implementation "androidx.compose.material:material-icons-extended:$compose"
debugImplementation "androidx.compose.ui:ui-tooling:$compose"
implementation "androidx.compose.ui:ui-tooling-preview:$compose"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose"
// hilt
implementation "androidx.hilt:hilt-work:1.0.0"
implementation "com.google.dagger:hilt-android:2.40.5"
kapt "com.google.dagger:hilt-android-compiler:2.40.5"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03"
kapt "androidx.hilt:hilt-compiler:1.0.0"
implementation "androidx.hilt:hilt-navigation-compose:1.0.0"
// android
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.activity:activity-compose:1.4.0"
testImplementation "junit:junit:4.13.2"
androidTestImplementation "androidx.test.ext:junit:1.1.3"
androidTestImplementation "androidx.test.espresso:espresso-core:3.4.0"
}