Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Load transitive dependencies #1

Closed
HaHaWTH opened this issue Sep 21, 2024 · 1 comment
Closed

[Feature] Load transitive dependencies #1

HaHaWTH opened this issue Sep 21, 2024 · 1 comment

Comments

@HaHaWTH
Copy link

HaHaWTH commented Sep 21, 2024

Currently, ezlib only handles direct dependencies. However, it would be nice if the library could also resolve transitive dependencies. This feature would allow ezlib to automatically manage and include dependencies of dependencies, makes dependency tree management easier.

@Rubenicos
Copy link
Collaborator

Use EzlibLoader.

dependencies {
    implementation 'com.saicone.ezlib:loader:VERSION'
    // Use annotations
    compileOnly 'com.saicone.ezlib:annotations:VERSION'
    annotationProcessor 'com.saicone.ezlib:annotations:VERSION'
}

With annotations:

@Dependency("redis.clients:jedis:4.2.2")
public class Main {
    public static void main(String[] args) {
        new EzlibLoader().load();
    }
}

By extending it:

public class LibraryLoader extends EzlibLoader {
    private static final Dependency JEDIS = Dependency.of("redis.clients:jedis:4.2.2");
}

public class Main {
    public static void main(String[] args) {
        new LibraryLoader().load();
    }
}

Using methods:

public class Main {
    public static void main(String[] args) {
        final EzlibLoader libraryLoader = new EzlibLoader();
        libraryLoader.loadDependency("redis.clients:jedis:4.2.2");
        libraryLoader.load();
    }
}

If you want a more detailed tutorial, join on Discord server.

@Rubenicos Rubenicos changed the title [Feature Request] Transitive dependency resolve [Feature] Load transitive dependencies Sep 21, 2024
@Rubenicos Rubenicos pinned this issue Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants