Skip to content

Commit

Permalink
Simplify license management
Browse files Browse the repository at this point in the history
Only EPL-2.0 is used, no need to lookup a license per project.

Issue #1597
  • Loading branch information
sormuras committed Sep 27, 2018
1 parent 3b75241 commit f22d567
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
19 changes: 5 additions & 14 deletions build.gradle
Expand Up @@ -63,21 +63,12 @@ ext {

mavenizedProjects = platformProjects + jupiterProjects + vintageProjects

licenses = [
'EPL-2.0': [
name: 'Eclipse Public License v2.0',
url: 'http://www.eclipse.org/legal/epl-v20.html',
headerFile: 'eclipse-public-license-2.0.java'
],
'Apache-2.0': [
name: 'The Apache License, Version 2.0',
url: 'http://www.apache.org/licenses/LICENSE-2.0.txt',
headerFile: 'apache-license-2.0.java'
]
license = [
name: 'Eclipse Public License v2.0',
url: 'http://www.eclipse.org/legal/epl-v20.html',
headerFile: 'eclipse-public-license-2.0.java'
]

licenseOf = { project -> licenses['EPL-2.0'] }

jacocoTestProjects = [
'junit-jupiter-engine',
'junit-jupiter-migrationsupport',
Expand Down Expand Up @@ -355,7 +346,7 @@ subprojects { subproj ->
}

spotless {
def headerFile = rootProject.file('src/spotless/' + licenseOf(project)['headerFile'])
def headerFile = rootProject.file('src/spotless/' + license['headerFile'])
def importOrderConfigFile = rootProject.file('src/eclipse/junit-eclipse.importorder')
def javaFormatterConfigFile = rootProject.file('src/eclipse/junit-eclipse-formatter-settings.xml')

Expand Down
4 changes: 2 additions & 2 deletions gradle/publishing.gradle
Expand Up @@ -31,8 +31,8 @@ publishing {
}
licenses {
license {
name = licenseOf(project)['name']
url = licenseOf(project)['url']
name = project.license['name']
url = project.license['url']
}
}
developers {
Expand Down

0 comments on commit f22d567

Please sign in to comment.