-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
575 changed files
with
17,077 additions
and
7,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017 Christoph Böhme | ||
* Copyright 2017, 2021 Christoph Böhme et al. | ||
* | ||
* Licensed under the Apache License, Version 2.0 the "License"; | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -18,6 +18,7 @@ import java.util.regex.Matcher | |
|
||
plugins { | ||
id 'org.ajoberstar.grgit' version '2.3.0' | ||
id 'org.ec4j.editorconfig' version '0.0.3' | ||
id 'org.sonarqube' version '2.6.2' | ||
id 'io.codearte.nexus-staging' version '0.11.0' | ||
} | ||
|
@@ -38,16 +39,37 @@ project(':metafacture-runner') { | |
apply plugin: 'java' | ||
} | ||
|
||
editorconfig { | ||
excludes = [ | ||
'**/*.beacon', | ||
'**/*.bgzf', | ||
'**/*.bz2', | ||
'**/*.bzip2', | ||
'**/*.gzip', | ||
'**/*.xz', | ||
'gradlew*' | ||
] | ||
} | ||
|
||
subprojects { | ||
apply plugin: 'signing' | ||
apply plugin: 'maven' | ||
apply plugin: 'jacoco' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'maven-publish' | ||
|
||
check.dependsOn(editorconfigCheck) | ||
check.dependsOn(javadoc) | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
tasks.withType(JavaCompile) { | ||
'all -processing -rawtypes -serial'.split().each { | ||
options.compilerArgs << "-Xlint:${it}".toString() | ||
} | ||
|
||
options.compilerArgs << '-Werror' | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
|
@@ -67,11 +89,33 @@ subprojects { | |
group 'build' | ||
} | ||
|
||
task allDeps(type: DependencyReportTask) {} | ||
|
||
javadoc { | ||
options { | ||
addBooleanOption 'Xwerror', true | ||
} | ||
} | ||
|
||
artifacts { | ||
archives sourceJar | ||
archives javadocJar | ||
} | ||
|
||
checkstyle { | ||
toolVersion '8.30' | ||
checkstyleTest.enabled = false | ||
} | ||
|
||
test { | ||
systemProperties['org.slf4j.simpleLogger.defaultLogLevel'] = 'warn' | ||
|
||
testLogging { | ||
showStandardStreams = true | ||
exceptionFormat = 'full' | ||
} | ||
} | ||
|
||
signing { | ||
required { | ||
scmInfo.isRelease() && gradle.taskGraph.hasTask(tasks.uploadArchives) | ||
|
@@ -96,16 +140,16 @@ gradle.projectsEvaluated { | |
} | ||
|
||
def mavenProjectDescription = { | ||
name project.mavenName ?: project.name | ||
name = project.mavenName ?: project.name | ||
if (project.description) { | ||
description project.description | ||
} | ||
url 'https://github.com/culturegraph/metafacture-core' | ||
url 'https://github.com/metafacture/metafacture-core' | ||
inceptionYear '2011' | ||
developers { | ||
developer { | ||
id 'mgeipel' | ||
name 'Markus M. Geipel' | ||
name = 'Markus M. Geipel' | ||
email '[email protected]' | ||
url 'https://github.com/mgeipel' | ||
roles { | ||
|
@@ -115,7 +159,7 @@ gradle.projectsEvaluated { | |
} | ||
developer { | ||
id 'cboehme' | ||
name 'Christoph Böhme' | ||
name = 'Christoph Böhme' | ||
email '[email protected]' | ||
url 'https://github.com/cboehme' | ||
roles { | ||
|
@@ -125,18 +169,18 @@ gradle.projectsEvaluated { | |
} | ||
} | ||
organization { | ||
name 'Deutsche Nationalbibliothek' | ||
url 'http://dnb.de/' | ||
name = 'Metafacture' | ||
url 'https://github.com/metafacture' | ||
} | ||
licenses { | ||
license { | ||
name 'The Apache License, Version 2.0' | ||
name = 'The Apache License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
mailingLists { | ||
mailingList { | ||
name 'Metafacture Mailing List' | ||
name = 'Metafacture Mailing List' | ||
post '[email protected]' | ||
subscribe '[email protected]' | ||
unsubscribe '[email protected]' | ||
|
@@ -154,8 +198,8 @@ gradle.projectsEvaluated { | |
url 'https://github.com/metafacture/metafacture-core/issues' | ||
} | ||
ciManagement { | ||
system 'Travis CI' | ||
url 'https://travis-ci.org/metafacture/metafacture-core' | ||
system 'Github Actions' | ||
url 'https://github.com/metafacture/metafacture-core/actions' | ||
} | ||
} | ||
|
||
|
@@ -277,7 +321,6 @@ class ScmInfo { | |
} | ||
|
||
def getScmInfo() { | ||
def version = null | ||
def tag = getGitTag() | ||
if (tag != null) { | ||
logger.lifecycle('SCM tag found. Making a release build') | ||
|
@@ -295,11 +338,11 @@ def getSnapshotVersion() { | |
logger.warn('No Git repository found') | ||
return 'non-scm-build-SNAPSHOT' | ||
} | ||
if (grgit.branch.current().fullName.equals('HEAD')) { | ||
if (grgit.branch.current().fullName == 'HEAD') { | ||
logger.lifecycle('Detached HEAD found') | ||
return "commit-${grgit.head().id}-SNAPSHOT" | ||
} | ||
if (grgit.branch.current().name.equals('master')) { | ||
if (grgit.branch.current().name == 'master') { | ||
logger.lifecycle('On master branch') | ||
return 'master-SNAPSHOT' | ||
} | ||
|
Oops, something went wrong.