diff --git a/main.go b/main.go index 5d31350..9e42e8a 100644 --- a/main.go +++ b/main.go @@ -310,6 +310,7 @@ func licenseHeader(path string, tmpl *template.Template, data licenseData) ([]by ".dart", ".go", ".groovy", + ".gradle", ".hcl", ".m", ".mm", ".php", diff --git a/main_test.go b/main_test.go index ffd25ef..5aa7648 100644 --- a/main_test.go +++ b/main_test.go @@ -332,6 +332,7 @@ func TestLicenseHeader(t *testing.T) { "f.dart", "f.go", "f.groovy", + "f.gradle", "f.hcl", "f.m", "f.mm", "f.php", diff --git a/testdata/expected/file.gradle b/testdata/expected/file.gradle new file mode 100644 index 0000000..42e27e2 --- /dev/null +++ b/testdata/expected/file.gradle @@ -0,0 +1,17 @@ +// Copyright 2018 Google LLC +// +// 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. +// See the License for the specific language governing permissions and +// limitations under the License. + +application { + mainClass = 'com.google.helloworld' +} diff --git a/testdata/initial/file.gradle b/testdata/initial/file.gradle new file mode 100644 index 0000000..6279580 --- /dev/null +++ b/testdata/initial/file.gradle @@ -0,0 +1,3 @@ +application { + mainClass = 'com.google.helloworld' +}