Comments (8)
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.
@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.
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.
@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.
@teozkr
Solution:
- Make a the package 'org.spongepowered.example' in the java folder.
- 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.
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.
Ow. I didn't look at that. Sorry ...
from spongeapi.
@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)
- RFC: World Transactional API
- Expose FastUtil in API HOT 2
- Can't get Biome Volume Factory with factory provider HOT 1
- Server-scoped PlayerChatRouter
- Ability to Hide Entities - "Sending Single Client Data" HOT 1
- Add method to retrieve level name from world properties
- Add Java Modules to Sponge API
- Amendments to API org.spongepowered.api.service.permission.SubjectData
- Enhanced Loot Table support HOT 1
- Typo
- automatic parameterized registration of plugin derived permission sets HOT 1
- Add a DataFormats.SNBT
- DataTranslator registry HOT 1
- Unregister an existing command registration
- Compile API 9 in Java 8 HOT 1
- Review content of util package HOT 1
- Make ServersideConnectionEvent.Handshake a Cancellable MessageEvent, like Auth
- Inventory from BlockSnapshot
- Return type of Container#type()
- Ability to get active bossbars on player
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spongeapi.