-
-
Notifications
You must be signed in to change notification settings - Fork 418
/
build.gradle
162 lines (133 loc) · 5.61 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
plugins {
id 'com.android.application'
}
apply plugin: 'kotlin-android'
apply plugin: 'com.mikepenz.aboutlibraries.plugin' // has to be applied AFTER android
if (getSigningFile() != null) {
apply from: "${getSigningFile()}"
}
android {
compileSdk = libs.versions.compileSdk.get().toInteger()
namespace = "com.mikepenz.aboutlibraries.sample"
defaultConfig {
minSdk = libs.versions.minSdk.get().toInteger()
targetSdk = libs.versions.targetSdk.get().toInteger()
versionName VERSION_NAME
versionCode Integer.parseInt(VERSION_CODE)
multiDexEnabled true
setProperty("archivesBaseName", "AboutLibraries-v$versionName-c$versionCode")
}
buildTypes {
debug {
applicationIdSuffix ".debug"
versionNameSuffix "-DEBUG"
if (getSigningFile() != null) {
signingConfig signingConfigs.debug
}
minifyEnabled false
}
release {
if (getSigningFile() != null) {
signingConfig signingConfigs.release
}
zipAlignEnabled true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
staging {
if (getSigningFile() != null) {
signingConfig signingConfigs.release
}
applicationIdSuffix ".debugStaging"
matchingFallbacks = ['debug']
}
}
productFlavors {
}
lintOptions {
abortOnError false
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = "11"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
packagingOptions {
exclude 'META-INF/library-core_release.kotlin_module'
exclude 'META-INF/library_release.kotlin_module'
}
}
// It is possible to define a custom config path with custom mappings
aboutLibraries {
// - if the automatic registered android tasks are disabled, a similar thing can be achieved manually
// - `./gradlew app:exportLibraryDefinitions -PaboutLibraries.exportPath=src/main/res/raw`
// - the resulting file can for example be added as part of the SCM
// registerAndroidTasks = false
// define the path configuration files are located in. E.g. additional libraries, licenses to add to the target .json
configPath = "config"
// allow to enable "offline mode", will disable any network check of the plugin (including [fetchRemoteLicense] or pulling spdx license texts)
offlineMode = false
// enable fetching of "remote" licenses. Uses the GitHub API
fetchRemoteLicense = true
// (optional) GitHub token to raise API request limit to allow fetching more licenses
gitHubApiToken = getLocalOrGlobalProperty("github.pat")
// Full license text for license IDs mentioned here will be included, even if no detected dependency uses them.
// additionalLicenses = ["mit", "mpl_2_0"]
// Allows to exclude some fields from the generated meta data field.
// excludeFields = ["developers", "funding"]
// Define the strict mode, will fail if the project uses licenses not allowed
// - This will only automatically fail for Android projects which have `registerAndroidTasks` enabled
// For non Android projects, execute `exportLibraryDefinitions`
strictMode = com.mikepenz.aboutlibraries.plugin.StrictMode.FAIL
// Allowed set of licenses, this project will be able to use without build failure
allowedLicenses = ["Apache-2.0", "asdkl"]
// Enable the duplication mode, allows to merge, or link dependencies which relate
duplicationMode = com.mikepenz.aboutlibraries.plugin.DuplicateMode.LINK
// Configure the duplication rule, to match "duplicates" with
duplicationRule = com.mikepenz.aboutlibraries.plugin.DuplicateRule.SIMPLE
// Enable pretty printing for the generated JSON file
prettyPrint = true
// Allows to only collect dependencies of specific variants during the `collectDependencies` step.
// filterVariants = ["debug"]
}
dependencies {
implementation project(':aboutlibraries-core')
implementation project(':aboutlibraries')
implementation project(':aboutlibraries-compose')
implementation(libs.androidx.activity.compose)
implementation(libs.androidx.cardView)
implementation(libs.androidx.recyclerView)
implementation(libs.google.material)
implementation(libs.bundles.accompanist)
implementation(libs.bundles.compose.androidx)
//used to generate the drawer on the left
//https://github.com/mikepenz/MaterialDrawer
implementation(libs.materialDrawer.core)
//used to provide different itemAnimators for the RecyclerView
//https://github.com/mikepenz/ItemAnimators
implementation(libs.itemAnimators.core)
// used to provide out of the box icon font support. simplifies development,
// and provides scalable icons. the core is very very light
// https://github.com/mikepenz/Android-Iconics
implementation(libs.iconics.core)
//used to display the icons in the drawer
//https://github.com/mikepenz/Android-Iconicsx`
implementation("com.mikepenz:material-design-iconic-typeface:2.2.0.8-kotlin@aar")
// used only tho showcase multi flavor support
stagingImplementation(libs.okhttp.core)
}
configurations.all {
resolutionStrategy.force(libs.fastAdapter.core)
resolutionStrategy.force(libs.iconics.core)
}