forked from DexPatcher/multidexlib2
-
Notifications
You must be signed in to change notification settings - Fork 9
/
check-copyright.gradle
30 lines (27 loc) · 1.03 KB
/
check-copyright.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
/*
* multidexlib2 - Copyright 2015-2020 Rodrigo Balerdi
* (GNU General Public License version 3 or later)
*
* multidexlib2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*/
import java.text.SimpleDateFormat
task checkCopyrightNotice {
dependsOn { subprojects*.tasks.build }
def notice = "Copyright 2015-${new SimpleDateFormat('yyyy').format(new Date())}"
def checkNotice = { noticeFile ->
if (!file(noticeFile).text.contains(notice)) {
System.err.println "******************************** WARNING ********************************"
System.err.println "Expired copyright notice: ${noticeFile}"
System.err.println "***************************************************************************"
}
}
doLast {
checkNotice 'NOTICE.txt'
}
}
build {
dependsOn checkCopyrightNotice
}