Skip to content

Commit

Permalink
Apply Spotless to buildSrc too.
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskorn committed Dec 16, 2018
1 parent 66b5862 commit fb73d78
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import org.gradle.api.Project
import org.gradle.api.tasks.Copy
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.register

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import io.codearte.gradle.nexus.NexusStagingExtension
Expand Down Expand Up @@ -138,8 +156,6 @@ private fun Project.createPublishingTasks(repoUsername: String?, repoPassword: S
}
}



tasks.named("publishMavenJavaPublicationTo${snapshotsRepositoryName.capitalize()}Repository").configure {
dependsOn(validateCredentialsTask)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import com.diffplug.gradle.spotless.SpotlessExtension
Expand Down Expand Up @@ -61,6 +79,7 @@ fun Project.configureSpotless() {
}

kotlin {
target("src/**/*.kt", "buildSrc/**/*.kt")
ktlint("0.29.0")

@Suppress("INACCESSIBLE_TYPE")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import com.diffplug.gradle.spotless.SpotlessPlugin
import org.ajoberstar.reckon.gradle.ReckonExtension
import org.ajoberstar.reckon.gradle.ReckonPlugin
import org.gradle.api.Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
Copyright 2018 Charles Korn.
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.
*/

package com.charleskorn.kaml.build

import org.gradle.api.Project
Expand Down

0 comments on commit fb73d78

Please sign in to comment.