Giter Club home page Giter Club logo

plugin-yml's People

Contributors

56738 avatar booky10 avatar dawon avatar devsrsouza avatar jpenilla avatar lordofpipes avatar proximyst avatar rainbowdashlabs avatar stephan-gh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plugin-yml's Issues

Task generateBukkitPluginDescription fails

When I try to build my project I receive the following error:

Execution failed for task 'Project:generateBukkitPluginDescription'.
> 'com.fasterxml.jackson.core.io.ContentReference com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createContentReference(java.lang.Object)'
My build.gradle.kts contents
bukkit {
    main = "main"
    version = pluginVersion
}

paper {
    website = "content"
    version = pluginVersion
    description = "content"
    authors = listOf("content")
    main = "main"
    foliaSupported = false
    apiVersion = "1.20"
}

Can't import plugin

When importing the plugin using id 'net.minecrell.plugin-yml.paper' version '0.6.0-SNAPSHOT' (groovy) I get this error:

org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'net.minecrell.plugin-yml.paper', version: '0.6.0-SNAPSHOT'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'net.minecrell.plugin-yml.paper:net.minecrell.plugin-yml.paper.gradle.plugin:0.6.0-SNAPSHOT')
  Searched in the following repositories:
    Gradle Central Plugin Repository
    maven(https://papermc.io/repo/repository/maven-public/)

Support Shadow Plugin

When trying to use the plugin-yml in combination with com.github.johnrengelman.shadow (often used to shadow dependencies into the jar) library dependencies are shadowed into the jar.

Library dependencies should be compileOnly in this context.

Update Plugin

Could you please publish an update so I can use the fix for #20?

No signature of method: build_cs1dxgpbzjvnqu203tc6dv6un.bukkit() is applicable for argument types:

A problem occurred evaluating root project 'Hordes-1.8'.
> No signature of method: build_cs1dxgpbzjvnqu203tc6dv6un.bukkit() is applicable for argument types: (build_cs1dxgpbzjvnqu203tc6dv6un$_run_closure6) values: [build_cs1dxgpbzjvnqu203tc6dv6un$_run_closure6@4ad59117]
  Possible solutions: wait(), wait(long), mkdir(java.lang.Object), uri(java.lang.Object), split(groovy.lang.Closure)

When I add depend = asList('WorldGuard', 'PlaceholderAPI') to the bukkit task. been stuck on this for a bit. gradle version: 7.5.1

paper-plugin.yml | How to do?

Hey,
How am I'm supposed to create a bootloader for a plugin which will automatically load the dependencies from the 'paper-libraries.json'(? not sure if this name is correct, it is very poorly documented).
When using the 'paperLibrary(depencency)' keyword it will not load the dependency in the plugin.

Problems with dependencies still being included in class path

Hi, I am unsure if this is an issue with the project or if I am just using it wrong. But I've tried it for 5 sessions now without success and I am a bit frustrated so I thought I would just ask.

I have 2 main questions:

  1. I am using the libs.versions.toml for the dependency versions. I am using kSpigot to have better Kotlin support while developing my plugin. I have added it to my dependencies via library(), even tough I have configured paper to generate the libraries.json the dependency does not get downloaded and the plugin does not load because it is missing it. Is that because kSpigot changes something about how plugins are loaded or am I doing something wrong?

  2. I have added the kotlin stdlib as a library() dependency but my compiled jar still contains "kotlin" and "kotlinx" and other kotlin related stuff. What am I doing wrong there?

Thx for your help!

Snippet from build.gradle.kts:

dependencies {
    library(kotlin("stdlib"))
    library(libs.adventureApi)
    library(libs.adventureMiniMessage)

    library(libs.kSpigot)

    paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
}

paper {
    website = "Website.de"
    version = pluginVersion
    description = "..."
    authors = listOf("Author1", "Author2")

    main = "<My main class>"

    foliaSupported = false
    apiVersion = "1.20"
    generateLibrariesJson = true
}
Entire build.gradle.kts
val repoUsername: String by project
val repoPassword: String by project
val langTestServerLocation: String by project

plugins {
  alias(libs.plugins.kotlinJvm)
  alias(libs.plugins.paperweight)
  alias(libs.plugins.pluginYmlPaper)
  alias(libs.plugins.shadow)
  `maven-publish`
}

val serverTestVersion = setOf("1.20")

val pluginVersion = "1.1.0"

repositories {
  mavenCentral()
  maven {
      url = uri("<my-repo>")
      credentials {
          username = repoUsername
          password = repoPassword
      }
  }
  maven("https://repo.cloudnetservice.eu/repository/releases/")
}

dependencies {
  library(kotlin("stdlib"))
  library(libs.adventureApi)
  library(libs.adventureMiniMessage)

  library(libs.kSpigot)

  paperweight.paperDevBundle("1.20.1-R0.1-SNAPSHOT")
}

paper {
  website = "Website.de"
  version = pluginVersion
  description = "..."
  authors = listOf("Author1", "Author2")

  main = "<My main class>"

  foliaSupported = false
  apiVersion = "1.20"
  generateLibrariesJson = true
}

publishing {
  repositories {
      maven {
          name = "repoPrivate"
          url = uri("<my-repo>>")
          credentials {
              username = repoUsername
              password = repoPassword
          }
      }
  }
  publications {
      create<MavenPublication>("maven") {
          groupId = "<class>"
          artifactId = "<name>"
          version = pluginVersion
          from(components["java"])
      }
  }
}

tasks.jar {
  val dependencies = configurations
      .runtimeClasspath
      .get()
      .map(::zipTree)
  from(dependencies)
  duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}



tasks {
  build {
      dependsOn(reobfJar)
  }
  compileJava {
      options.encoding = "UTF-8"
      options.release.set(17)
  }
  compileKotlin {
      kotlinOptions.jvmTarget = "17"
  }
}

tasks.register("deploy") {
  group = "deploy"
  description = "Deploys the plugin to the server"
  dependsOn(tasks.shadowJar)
  doLast {
      for (serverTestVersion in serverTestVersion) {
          val serverDirectory = File(langTestServerLocation, serverTestVersion)
          val pluginDirectory = File(serverDirectory, "plugins")
          val pluginFile = File(pluginDirectory, "${project.name}.jar")
          if (pluginFile.exists()) {
              pluginFile.delete()
          }
          pluginFile.createNewFile()
          pluginFile.writeBytes(tasks.shadowJar.get().archiveFile.get().asFile.readBytes())
      }
  }
}

Add compatibility with gradle configuration cache

When trying to use this plugin with configuration cache we have these issues, would be glad if you'll be able to add this compatibility

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':script-host:generateBukkitPluginDescription'.
> Cannot fingerprint input property 'librariesConfiguration': value 'configuration ':script-host:bukkitLibrary'' cannot be serialized.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Configuration cache problems found in this build.

3 problems were found storing the configuration cache, 2 of which seem unique.
- Task `:script-host:generateBukkitPluginDescription` of type `net.minecrell.pluginyml.GeneratePluginDescription`: cannot serialize object of type 'org.gradle.api.internal.artifacts.configurations.DefaultConfiguration', a subtype of 'org.gradle.api.artifacts.Configuration', as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.0.2/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
- Task `:script-host:generateBukkitPluginDescription` of type `net.minecrell.pluginyml.GeneratePluginDescription`: cannot serialize object of type 'org.gradle.api.internal.project.DefaultProject', a subtype of 'org.gradle.api.Project', as these are not supported with the configuration cache.
  See https://docs.gradle.org/8.0.2/userguide/configuration_cache.html#config_cache:requirements:disallowed_types
  
  
See the complete report at [generated file](https://github.com/Minecrell/plugin-yml/files/11211022/configuration-cache-report.zip)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Configuration cache entry discarded with 3 problems.

Execution failed for task ':generateBukkitPluginDescription'.

When trying to build my project, the following error occurs:

Execution failed for task ':generateBukkitPluginDescription'.
> Cannot fingerprint input property 'librariesConfiguration': value 'configuration ':bukkitLibrary'' cannot be serialized.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 11s
2 actionable tasks: 2 executed

my config:

bukkit {
    main = "rocks.clanattack.impl.entry.Boot"
    version = "0.0.0"
    apiVersion = "1.20"
    name = "ClanAttack Rocks (Core-API)"

    authors = listOf("CheeseTastisch")
    libraries = listOf(
        "com.fasterxml.jackson.core:jackson-databind:2.15.2",
        "com.fasterxml.jackson.module:jackson-module-kotlin:2.15.2",
        "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2",

        "org.jetbrains.kotlin:kotlin-reflect:1.7.22",
        "org.reflections:reflections:0.9.12"
    )
}

Update plugin

The version found at plugins.gradle.org is still 0.4.0. It does not contain support for libraries.
I would love to make use of this feature without having to add the plugin manually to the classpath.

generateLibrariesJson doesn't respect dependency classifier/extension

Exported dependency coords do not include classifiers and extensions. This leads to some bugs, e.g. server trying to download jar artifact for pom dependency (with PluginLoader implementation presented in README)

My personal workaround atm is exporting artifacts instead of dependencies, but you may not like it because of increased JSON file size.

Support 1.20

apiVersion = "1.20" is resulting in the plugin.yml having: api-version: 1.20, which yml interprets as 1.2.

Commands (and very likely permissions) are broken on Gradle 4.10

When I try to create a new command, then Gradle throws an exception and mentions something about "Command with name 'creategame' not found.". Here's the stacktrace: https://paste.wut.ee/avecocenoz.cs
I guess that something changed in Gradle API? 🤔
It works in 4.8 perfectly. I tried both 0.2.1 and 0.3.0 plugin versions.

I have this in my build.gradle.kts:

bukkit {
    name = "x"
    description = "y"
    authors = listOf("mikroskeem")
    main = "z"

    commands {
        "creategame" {
            description = "Creates a new game"
        }
    }
}

Current workaround is to use this:

bukkit {
    // ...
    commands.create("creategame") {
        description = "Creates a new game"
    }
}

Libraries file includes every single repository

When you enable generation of the libraries file, the file includes all repositories that you have set in the entire gradle project, this isn't a big issue but it causes server to keep looking around repositories.

Ways this can be fixed

  • Automatically detect the repositories required
  • Allow us to override the repositories section that will be put in the libraries file

PaperMC api-version lower than 1.19

Hello,
I don't quite understand why the api-version field has to be set to at least 1.19.
As far as I know this property was already present in 1.16 versions and I want to indicate that my plugin is compatible with any version since 1.16.
Am I missing something that explains this?
Cheers.

"library" not adding dependencies to pom.xml for Maven publication

So whenever I add something to my plugin as a library, it works fine. However, there's one problem. It won't add them to the pom.xml used for publishing.

To reproduce:

  • Add something as a library
  • Run the generatePomFileForMavenPublication task

If you're interested, my build.gradle file is here: https://github.com/plexusorg/Plex/blob/master/build.gradle

You'll see that it won't add it to the pom.xml. Any idea if we can get a fix for this?

PS: this plugin doesn't work on Gradle 7.4+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.