forked from JabRef/jabref
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add Dagger #518
Closed
Closed
Add Dagger #518
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example generated code: // Generated by Dagger (https://dagger.dev).
package org.jabref.cli;
import dagger.Lazy;
import dagger.MembersInjector;
import dagger.internal.DaggerGenerated;
import dagger.internal.DoubleCheck;
import dagger.internal.InjectedFieldSignature;
import javax.inject.Provider;
import org.jabref.logic.util.BuildInfo;
@DaggerGenerated
@SuppressWarnings({
"unchecked",
"rawtypes"
})
public final class JabRefCLI_MembersInjector implements MembersInjector<JabRefCLI> {
private final Provider<BuildInfo> buildInfoProvider;
public JabRefCLI_MembersInjector(Provider<BuildInfo> buildInfoProvider) {
this.buildInfoProvider = buildInfoProvider;
}
public static MembersInjector<JabRefCLI> create(Provider<BuildInfo> buildInfoProvider) {
return new JabRefCLI_MembersInjector(buildInfoProvider);
}
@Override
public void injectMembers(JabRefCLI instance) {
injectBuildInfo(instance, DoubleCheck.lazy(buildInfoProvider));
}
@InjectedFieldSignature("org.jabref.cli.JabRefCLI.buildInfo")
public static void injectBuildInfo(JabRefCLI instance, Lazy<BuildInfo> buildInfo) {
instance.buildInfo = buildInfo;
}
} |
# Conflicts: # src/main/java/org/jabref/gui/entryeditor/RelatedArticlesTab.java # src/main/java/org/jabref/preferences/JabRefPreferences.java
Superseeded by #687 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Google's Dagger seems to be a nice dependency injection framework [slides].
Since
@Inject
is also used by Afterburner, I had to removeprivate
at some places. The dependency injection is not complete; there needs to be proper thought about the "modules". I started withFetchers
to bundle fetchers and adding a quick hack.Current state: Does not compile:
First error:
According to https://stackoverflow.com/q/67647474/873282, one has to use
id 'org.jetbrains.kotlin.jvm' version '1.5.30'
. Then, one gets following error:This probably can be solved by using a different JVM. See https://github.com/JetBrains/kotlin#build-environment-requirements for details.
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)