Giter Club home page Giter Club logo

Comments (8)

xaeroverse avatar xaeroverse commented on August 12, 2024

I know this is a premature time to ask, but has the build system that'll be exposed to plugin devs been discussed yet? IMO, this project's root build.gradle should only support the API and not the example plugin.

For compiling the example project, I see a space for a -src distributable (a la Forge/FML) with which this git repo will be based upon. The example plugin's build.gradle would be included in this git repo, but it would be separate from the API's build.gradle. As an example, FML has an install folder as a source to pull from. Generating this -src distributable though requires support in FG itself, and I'm not sure if we're going that route.

We'd also have to discuss how the API is getting to the end-modder (I recall @AbrarSyed mentioning a maven repo for API artifacts) and how they'll be able to test their plugins (i.e. the Sponge coremod should be hosted too or something).

from spongeapi.

nightkr avatar nightkr commented on August 12, 2024

@xaeroverse It's built to a separate jar as is (in #150), and you could probably disable Maven publishing for that project specifically. Gradle isn't recursive when discovering subprojects, so people pulling in SpongeAPI as a Git submodule (or Mercurial subrepository) won't get even have the example plugin built unless they specifically ask for it.

from spongeapi.

AbrarSyed avatar AbrarSyed commented on August 12, 2024

To be clear... Gradle does not 'search' for sub projects. All sub projects are explocitely defined in the settings.gradle

As for an example plugin... Just put it in src/test/java as that's where all unit tests and such should go. However the best thing IMO is to just make the example in a separate repository.

from spongeapi.

nightkr avatar nightkr commented on August 12, 2024

@AbrarSyed Gradle doesn't build a jar out of the test sources, so you can't load it into the server then. A new repository is a separate discussion.

from spongeapi.

thomas15v avatar thomas15v commented on August 12, 2024

@teozkr
Solution:

  1. Make a the package 'org.spongepowered.example' in the java folder.
  2. Move ExamplePlugin.java to that package.

This will cause the plugin to be compiled together with sponge. But its good to test things.

Notice: The main methods of the plugin don't get called somehow. But FML recognise it.

from spongeapi.

nightkr avatar nightkr commented on August 12, 2024

@thomas15v

This will cause the plugin to be compiled together with sponge. But its good to test things.

Did you look at the PR (#150, once again) before commenting?

from spongeapi.

thomas15v avatar thomas15v commented on August 12, 2024

Ow. I didn't look at that. Sorry ...

from spongeapi.

Lunaphied avatar Lunaphied commented on August 12, 2024

@Zidane Sorry switched tabs, this is the issue to close, given that it's referring to a non-existent target.

from spongeapi.

Related Issues (20)

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.