Skip to content

Commit 0f0c611

Browse files
author
Justin Ryan
committed
Enable license header plugin
1 parent cc1b04c commit 0f0c611

4 files changed

Lines changed: 15 additions & 6 deletions

File tree

build.gradle

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ext.githubProjectName = rootProject.name // TEMPLATE: change to match github pro
44

55
buildscript {
66
repositories { mavenCentral() }
7+
apply from: file('gradle/buildscript.gradle'), to: buildscript
78
}
89

910
allprojects {
@@ -14,7 +15,7 @@ allprojects {
1415
apply from: file('gradle/convention.gradle')
1516
apply from: file('gradle/maven.gradle')
1617
apply from: file('gradle/check.gradle')
17-
//apply from: file('gradle/license.gradle') // Waiting for re-release
18+
apply from: file('gradle/license.gradle')
1819

1920
subprojects {
2021
// Closure to configure all the POM with extra info, common to all projects
@@ -44,6 +45,7 @@ subprojects {
4445
}
4546

4647
project(':template-client') {
48+
apply plugin: 'java'
4749
dependencies {
4850
compile 'org.slf4j:slf4j-api:1.6.3'
4951
compile 'com.sun.jersey:jersey-client:1.11'

codequality/HEADER

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright 2012 Netflix, Inc.
1+
Copyright ${year} Netflix, Inc.
22

33
Licensed under the Apache License, Version 2.0 (the "License");
44
you may not use this file except in compliance with the License.

gradle/buildscript.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Executed in context of buildscript
2+
dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.0' }
3+

gradle/license.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
1-
buildscript {
2-
dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5' }
3-
}
1+
// Dependency for plugin was set in buildscript.gradle
42

5-
apply plugin: nl.javadude.gradle.plugins.license.LicensePlugin
3+
subprojects {
4+
apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin
5+
license {
6+
header rootProject.file('codequality/HEADER')
7+
ext.year = Calendar.getInstance().get(Calendar.YEAR)
8+
}
9+
}

0 commit comments

Comments
 (0)