forked from google/android-fhir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LicenseeConfig.kt
208 lines (172 loc) · 8.87 KB
/
LicenseeConfig.kt
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
/*
* Copyright 2023-2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
fun Project.configureLicensee() {
apply(plugin = "app.cash.licensee")
configure<app.cash.licensee.LicenseeExtension> {
allow("Apache-2.0")
allow("BSD-2-Clause")
allow("BSD-3-Clause")
allow("MIT")
ignoreDependencies("com.ibm.icu", "icu4j") {
because(
"ICU uses an ICU license that was mispaced and cannot be loaded by this tool right now",
)
}
// Occasionally, dependencies may add their licenses via a direct URL instead of an SPDX id.
nonStandardLicenseUrls.forEach { allowUrl(it) }
ignoreDependencies("junit", "junit") {
because("JUnit is used in tests only, so it is not distributed with our library")
}
ignoreDependencies("org.jacoco", "org.jacoco.agent") {
because("JaCoCo is used in tests only, so it is not distributed with our library")
}
allowDependency("org.javassist", "javassist", "3.29.0-GA") {
because("Multi-licensed under Apache. https://github.com/jboss-javassist/javassist")
}
// xpp3 (HAPI FHIR transitive dep)
allowDependency("xpp3", "xpp3_xpath", "1.1.4c") {
because("Custom license, essentially BSD-5. https://fedoraproject.org/wiki/Licensing/xpp")
}
// json-patch and its transitive deps
allowDependency("com.github.java-json-tools", "btf", "1.3") {
because("Dual-licensed under Apache. https://github.com/java-json-tools/btf")
}
allowDependency("com.github.java-json-tools", "jackson-coreutils", "2.0") {
because("Dual-licensed under Apache. https://github.com/java-json-tools/jackson-coreutils")
}
allowDependency("com.github.java-json-tools", "json-patch", "1.13") {
because("Dual-licensed under Apache. https://github.com/java-json-tools/json-patch")
}
allowDependency("com.github.java-json-tools", "msg-simple", "1.2") {
because("Dual-licensed under Apache. https://github.com/java-json-tools/msg-simple")
}
// SQLCipher
allowDependency("net.zetetic", "android-database-sqlcipher", "4.5.0") {
because("Custom license, essentially BSD-3. https://www.zetetic.net/sqlcipher/license/")
}
allowDependency("net.zetetic", "android-database-sqlcipher", "4.5.4") {
because("Custom license, essentially BSD-3. https://www.zetetic.net/sqlcipher/license/")
}
// Jakarta XML Binding API
allowDependency("jakarta.xml.bind", "jakarta.xml.bind-api", "2.3.3") {
because("BSD 3-clause.")
}
// Jakarta Activation API 2.1 Specification
allowDependency("jakarta.activation", "jakarta.activation-api", "1.2.2") {
because(
"Licensed under Eclipse Distribution License 1.0. https://www.eclipse.org/org/documents/edl-v10.php",
)
}
// Javax Annotation API
allowDependency("javax.annotation", "javax.annotation-api", "1.3.2") {
because("Dual-licensed under CDDL 1.1 and GPL v2 with classpath exception.")
}
// Streaming API for XML (StAX)
allowDependency("javax.xml.stream", "stax-api", "1.0-2") {
because("Dual-licensed under CDDL 1.0 and GPL v3.")
}
// xml-commons
allowDependency("xml-apis", "xml-apis", "1.4.01") {
because("Licensed under Mozilla Public License Version 2.0. https://www.mozilla.org/MPL/2.0/")
}
// The XSLT and XQuery Processor
allowDependency("net.sf.saxon", "Saxon-HE", "9.8.0-15") {
because("BSD 3-clause. https://www.antlr.org/license.html")
}
// ANTLR 4
allowDependency("org.antlr", "antlr-runtime", "3.5.3") {
because("BSD 3-clause. https://www.antlr.org/license.html")
}
// ANTLR 4
allowDependency("org.antlr", "antlr4-runtime", "4.10.1") {
because("BSD 3-clause. https://www.antlr.org/license.html")
}
// Utilities
// https://developers.google.com/android/reference/com/google/android/gms/common/package-summary
allowDependency("com.google.android.gms", "play-services-base", "17.4.0") { because("") }
allowDependency("com.google.android.gms", "play-services-base", "18.0.1") { because("") }
allowDependency("com.google.android.gms", "play-services-base", "18.1.0") { because("") }
allowDependency("com.google.android.odml", "image", "1.0.0-beta1") { because("") }
// More utility classes
// https://developers.google.com/android/reference/com/google/android/gms/common/package-summary
allowDependency("com.google.android.gms", "play-services-basement", "17.4.0") { because("") }
allowDependency("com.google.android.gms", "play-services-basement", "18.0.0") { because("") }
allowDependency("com.google.android.gms", "play-services-basement", "18.1.0") { because("") }
// https://developers.google.com/android/reference/com/google/android/gms/common/package-summary
allowDependency("com.google.android.gms", "play-services-clearcut", "17.0.0") { because("") }
// ML Kit barcode scanning https://developers.google.com/ml-kit/vision/barcode-scanning/android
allowDependency("com.google.android.gms", "play-services-mlkit-barcode-scanning", "16.1.4") {
because("")
}
// Play Services Phenotype
allowDependency("com.google.android.gms", "play-services-phenotype", "17.0.0") { because("") }
// Tasks API Android https://developers.google.com/android/guides/tasks
allowDependency("com.google.android.gms", "play-services-tasks", "17.2.0") { because("") }
allowDependency("com.google.android.gms", "play-services-tasks", "18.0.1") { because("") }
allowDependency("com.google.android.gms", "play-services-tasks", "18.0.2") { because("") }
// Barcode Scanning https://developers.google.com/ml-kit/vision/barcode-scanning
allowDependency("com.google.mlkit", "barcode-scanning", "16.1.1") { because("") }
// MLKit Common https://developers.google.com/ml-kit/vision/barcode-scanning
allowDependency("com.google.mlkit", "common", "17.1.1") { because("") }
allowDependency("com.google.mlkit", "common", "18.0.0") { because("") }
allowDependency("com.google.mlkit", "camera", "16.0.0-beta3") { because("") }
// Object Detection https://developers.google.com/ml-kit/vision/object-detection
allowDependency("com.google.mlkit", "object-detection", "16.2.3") { because("") }
// Object Detection https://developers.google.com/ml-kit/vision/object-detection
allowDependency("com.google.mlkit", "object-detection-common", "17.0.0") { because("") }
// Object Detection https://developers.google.com/ml-kit/vision/object-detection
allowDependency("com.google.mlkit", "object-detection-custom", "16.3.1") { because("") }
// Vision Common
// https://developers.google.com/android/reference/com/google/mlkit/vision/common/package-summary
allowDependency("com.google.mlkit", "vision-common", "16.3.0") { because("") }
allowDependency("com.google.mlkit", "vision-common", "17.0.0") { because("") }
// Vision Common
// https://developers.google.com/android/reference/com/google/mlkit/vision/common/package-summary
allowDependency("com.google.mlkit", "vision-internal-vkp", "18.0.0") { because("") }
allowDependency("com.google.mlkit", "vision-interfaces", "16.0.0") { because("") }
// Glide
allowDependency("com.github.bumptech.glide", "glide", "4.14.2") {
because("BSD, part MIT and Apache 2.0. https://github.com/bumptech/glide#license")
}
// Glide Annotations
allowDependency("com.github.bumptech.glide", "annotations", "4.14.2") {
because("BSD, part MIT and Apache 2.0. https://github.com/bumptech/glide#license")
}
// Glide Disk LRU Cache
allowDependency("com.github.bumptech.glide", "disklrucache", "4.14.2") {
because("BSD, part MIT and Apache 2.0. https://github.com/bumptech/glide#license")
}
// Glide GIF Decoder
allowDependency("com.github.bumptech.glide", "gifdecoder", "4.14.2") {
because("BSD, part MIT and Apache 2.0. https://github.com/bumptech/glide#license")
}
// ICU4C License
allowDependency("com.ibm.icu", "icu4j", "72.1") {
because("BSD, part MIT and Apache 2.0. https://github.com/unicode-org/icu/blob/main/LICENSE")
}
}
}
private val nonStandardLicenseUrls =
listOf(
// BSD-3
"https://opensource.org/licenses/BSD-3-Clause",
"https://www.opensource.org/licenses/bsd-license.php",
"https://asm.ow2.io/license.html",
"https://developer.android.com/studio/terms.html",
)