diff --git a/gradle/scripts/license.gradle b/gradle/scripts/license.gradle index c2724533cc..80343d16ee 100644 --- a/gradle/scripts/license.gradle +++ b/gradle/scripts/license.gradle @@ -1,6 +1,6 @@ apply plugin: 'license' -ext.licenseFile = file('.license_header.txt') +ext.licenseFile = file('wherehows-docs/license_header.txt') subprojects { apply plugin: 'com.github.hierynomus.license' diff --git a/gradle/scripts/play.gradle b/gradle/scripts/play.gradle index 858fcf105d..83f6fc937f 100644 --- a/gradle/scripts/play.gradle +++ b/gradle/scripts/play.gradle @@ -4,6 +4,15 @@ tasks.withType(PlayRun) { httpPort = project.ext.httpPort } +// Manually define a sourceSet for license checking +sourceSets { + licsense { + java { + srcDirs = ['app', 'test'] + } + } +} + model { components { play { diff --git a/wherehows-backend/app/controllers/Application.java b/wherehows-backend/app/controllers/Application.java index b464c83237..6f40b017a9 100644 --- a/wherehows-backend/app/controllers/Application.java +++ b/wherehows-backend/app/controllers/Application.java @@ -1,12 +1,12 @@ /** * Copyright 2015 LinkedIn Corp. All rights reserved. - *
+ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *
+ * * http://www.apache.org/licenses/LICENSE-2.0 - *
+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/wherehows-docs/coding-guidelines.md b/wherehows-docs/coding-guidelines.md index 18b32edc60..ecda6e64a4 100644 --- a/wherehows-docs/coding-guidelines.md +++ b/wherehows-docs/coding-guidelines.md @@ -1,6 +1,9 @@ # Code formatting Use standard [LinkedIn code style](LinkedIn%20Style.xml) in IntelliJ to format the code. +# License Header +Please add the [Apache License Header](license_header.txt) to all source files. You can automate this using the `licenseFormat` gradle task. + # Testing > Note: Info here is for pre-v1.0.0 and will need to be updated diff --git a/.license_header.txt b/wherehows-docs/license_header.txt similarity index 100% rename from .license_header.txt rename to wherehows-docs/license_header.txt diff --git a/wherehows-frontend/app/controllers/Application.java b/wherehows-frontend/app/controllers/Application.java index d41fc1280d..e6e34dcc75 100644 --- a/wherehows-frontend/app/controllers/Application.java +++ b/wherehows-frontend/app/controllers/Application.java @@ -1,12 +1,12 @@ /** * Copyright 2015 LinkedIn Corp. All rights reserved. - *
+ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - *
+ * * http://www.apache.org/licenses/LICENSE-2.0 - *
+ * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/wherehows-frontend/test/ApplicationTest.java b/wherehows-frontend/test/ApplicationTest.java index 490109ee86..8ecbbfd646 100644 --- a/wherehows-frontend/test/ApplicationTest.java +++ b/wherehows-frontend/test/ApplicationTest.java @@ -1,3 +1,16 @@ +/** + * Copyright 2015 LinkedIn Corp. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + */ import org.junit.*; import play.twirl.api.Content; diff --git a/wherehows-frontend/test/ControllersTest.java b/wherehows-frontend/test/ControllersTest.java index 780f161de6..c9f6a7dc7f 100644 --- a/wherehows-frontend/test/ControllersTest.java +++ b/wherehows-frontend/test/ControllersTest.java @@ -1,3 +1,16 @@ +/** + * Copyright 2015 LinkedIn Corp. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + */ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ArrayNode; diff --git a/wherehows-frontend/test/IntegrationTest.java b/wherehows-frontend/test/IntegrationTest.java index 7bef6fd225..1539a66099 100644 --- a/wherehows-frontend/test/IntegrationTest.java +++ b/wherehows-frontend/test/IntegrationTest.java @@ -1,3 +1,16 @@ +/** + * Copyright 2015 LinkedIn Corp. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + */ import org.junit.*; import play.libs.ws.WS;