Skip to content
Browse files

Enable license header plugin

  • Loading branch information...
1 parent cc1b04c commit 0f0c6114889de1c0c3d702661aa44f95ec76edea @quidryan quidryan committed Aug 17, 2012
Showing with 15 additions and 6 deletions.
  1. +3 −1 build.gradle
  2. +1 −1 codequality/HEADER
  3. +3 −0 gradle/buildscript.gradle
  4. +8 −4 gradle/license.gradle
View
4 build.gradle
@@ -4,6 +4,7 @@ ext.githubProjectName = rootProject.name // TEMPLATE: change to match github pro
buildscript {
repositories { mavenCentral() }
+ apply from: file('gradle/buildscript.gradle'), to: buildscript
}
allprojects {
@@ -14,7 +15,7 @@ allprojects {
apply from: file('gradle/convention.gradle')
apply from: file('gradle/maven.gradle')
apply from: file('gradle/check.gradle')
-//apply from: file('gradle/license.gradle') // Waiting for re-release
+apply from: file('gradle/license.gradle')
subprojects {
// Closure to configure all the POM with extra info, common to all projects
@@ -44,6 +45,7 @@ subprojects {
}
project(':template-client') {
+ apply plugin: 'java'
dependencies {
compile 'org.slf4j:slf4j-api:1.6.3'
compile 'com.sun.jersey:jersey-client:1.11'
View
2 codequality/HEADER
@@ -1,4 +1,4 @@
-Copyright 2012 Netflix, Inc.
+Copyright ${year} Netflix, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
View
3 gradle/buildscript.gradle
@@ -0,0 +1,3 @@
+// Executed in context of buildscript
+dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.6.0' }
+
View
12 gradle/license.gradle
@@ -1,5 +1,9 @@
-buildscript {
- dependencies { classpath 'nl.javadude.gradle.plugins:license-gradle-plugin:0.5' }
-}
+// Dependency for plugin was set in buildscript.gradle
-apply plugin: nl.javadude.gradle.plugins.license.LicensePlugin
+subprojects {
+apply plugin: 'license' //nl.javadude.gradle.plugins.license.LicensePlugin
+license {
+ header rootProject.file('codequality/HEADER')
+ ext.year = Calendar.getInstance().get(Calendar.YEAR)
+}
+}

0 comments on commit 0f0c611

Please sign in to comment.
Something went wrong with that request. Please try again.