bevy_auto_plugin 0.10.0

Procedural attribute macros for Bevy apps that reduce boilerplate by automatically registering components, resources, events, states, and systems in your plugin's build function.
Documentation
use bevy_app::prelude::*;
use bevy_auto_plugin::prelude::*;
use bevy_ecs::prelude::*;
use internal_test_proc_macro::xtest;

#[derive(AutoPlugin)]
struct TestPlugin;

#[auto_plugin(plugin = TestPlugin)]
fn plugin(my_app: &mut App) {
    my_app.init_resource::<Test>();
}

#[derive(Resource, Debug, PartialEq)]
struct Test(usize);

impl Default for Test {
    fn default() -> Self {
        Self(1)
    }
}

fn app() -> App {
    let mut app = internal_test_util::create_minimal_app();
    app.add_plugins(TestPlugin);
    app
}

#[xtest]
fn test_auto_plugin_param() {
    let app = app();
    assert_eq!(app.world().get_resource::<Test>(), Some(&Test(1)));
}