mirror of
https://github.com/gsantner/dandelion
synced 2025-09-09 10:19:42 +02:00
Load license, contributors, maintainers and 3party libs from ressources
This commit is contained in:
parent
89ee0450e9
commit
c93e28cdc7
10 changed files with 142 additions and 50 deletions
|
@ -53,14 +53,25 @@ dependencies {
|
|||
|
||||
|
||||
task copyRepoFiles(type: Copy) {
|
||||
String[] copyFiles = ["README.md", "CONTRIBUTORS.md", "LICENSE.md", "CHANGELOG.md"]
|
||||
String[] copyFiles = ["README.md", "LICENSE.md", "CHANGELOG.md"]
|
||||
from rootProject.files(copyFiles)
|
||||
into 'src/main/res/raw'
|
||||
rename { String fileName ->
|
||||
fileName.replace(fileName, fileName.toLowerCase())
|
||||
}
|
||||
filter { line -> (line.toString().matches("..l>>.*") || line.toString().startsWith("## 99l CONTRIBUTORS")) \
|
||||
? null : line.toString().trim()
|
||||
|
||||
// Filter Contributors file
|
||||
from(rootProject.file("CONTRIBUTORS.md")) {
|
||||
into '.' // Target already changed to 'src/main/res/raw'
|
||||
rename { String fileName ->
|
||||
fileName.replace(fileName, fileName.toLowerCase())
|
||||
}
|
||||
filter { line ->
|
||||
(line.toString().matches("..l>>.*") || line.toString().startsWith("## 99l CONTRIBUTORS")) ? null : line.toString().trim().replaceAll(" \\(.*\\)", "")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
tasks.copyRepoFiles.execute()
|
||||
tasks
|
||||
.
|
||||
copyRepoFiles.execute()
|
Loading…
Add table
Add a link
Reference in a new issue