Skip to content
This repository has been archived by the owner on Mar 2, 2023. It is now read-only.

Commit

Permalink
fix gradle plugin descriptors not being present in resources
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Feb 17, 2023
1 parent a47e64b commit 9510c99
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -639,3 +639,5 @@ FodyWeavers.xsd

### VisualStudio Patch ###
# Additional files built by Visual Studio

gradle/publishing.properties
5 changes: 2 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import java.io.StringReader
import java.util.Properties

plugins {
id("com.gradle.plugin-publish")
id("com.diffplug.spotless")

`java-gradle-plugin`
Expand Down Expand Up @@ -73,8 +74,6 @@ spotless {
}

gradlePlugin {
isAutomatedPublishing = false

@Suppress("UnstableApiUsage")
vcsUrl by "https://github.com/Noelware/gradle-infra"

Expand Down Expand Up @@ -182,7 +181,7 @@ val javadocJar by tasks.registering(Jar::class) {

publishing {
publications {
create<MavenPublication>("ktor") {
create<MavenPublication>("infra") {
from(components["java"])

artifactId = "gradle-infra-plugin"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ repositories {

dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.15.0")
implementation("com.gradle.publish:plugin-publish-plugin:1.1.0")
implementation("dev.floofy.commons:gradle:2.5.0")
implementation(kotlin("serialization", "1.8.10"))
implementation(kotlin("gradle-plugin", "1.8.10"))
implementation(gradleApi())
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/noelware/infra/gradle/Licenses.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public String url() {
public String getTemplate(String name, String description, String currentYear) throws IOException {
final String tmplFile =
switch (this) {
case APACHE -> "/apache.heading.tmpl";
case MIT -> "/mit.heading.tmpl";
case APACHE -> "/templates/apache.heading.tmpl";
case MIT -> "/templates/mit.heading.tmpl";
};

try (final InputStream stream = Objects.requireNonNull(getClass().getResourceAsStream(tmplFile))) {
Expand Down
22 changes: 22 additions & 0 deletions src/main/resources/org.noelware.gradle.java-library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ????? gradle-plugin: Gradle plugin to configure sane defaults for Noelware's Gradle projects
# Copyright (c) 2023 Noelware, LLC. <team@noelware.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

implementation-class=org.noelware.infra.gradle.plugins.module.JavaLibraryPlugin
22 changes: 22 additions & 0 deletions src/main/resources/org.noelware.gradle.java.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ????? gradle-plugin: Gradle plugin to configure sane defaults for Noelware's Gradle projects
# Copyright (c) 2023 Noelware, LLC. <team@noelware.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

implementation-class=org.noelware.infra.gradle.plugins.module.JavaModulePlugin
22 changes: 22 additions & 0 deletions src/main/resources/org.noelware.gradle.kotlin-library.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ????? gradle-plugin: Gradle plugin to configure sane defaults for Noelware's Gradle projects
# Copyright (c) 2023 Noelware, LLC. <team@noelware.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

implementation-class=org.noelware.infra.gradle.plugins.module.KotlinLibraryPlugin
22 changes: 22 additions & 0 deletions src/main/resources/org.noelware.gradle.kotlin.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ????? gradle-plugin: Gradle plugin to configure sane defaults for Noelware's Gradle projects
# Copyright (c) 2023 Noelware, LLC. <team@noelware.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

implementation-class=org.noelware.infra.gradle.plugins.module.KotlinModulePlugin
22 changes: 22 additions & 0 deletions src/main/resources/org.noelware.gradle.settings.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# ????? gradle-plugin: Gradle plugin to configure sane defaults for Noelware's Gradle projects
# Copyright (c) 2023 Noelware, LLC. <team@noelware.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

implementation-class=org.noelware.infra.gradle.plugins.settings.NoelwareSettingsPlugin

0 comments on commit 9510c99

Please sign in to comment.