Skip to content

Commit

Permalink
Internal changes
Browse files Browse the repository at this point in the history
RELNOTES=N/A
PiperOrigin-RevId: 485978563
  • Loading branch information
bcorso authored and Dagger Team committed Nov 3, 2022
1 parent ff66535 commit e52f7af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 1 addition & 2 deletions java/dagger/internal/codegen/DelegateComponentProcessor.java
Expand Up @@ -73,8 +73,7 @@ public void initialize(
legacyPlugin ->
env.getMessager()
.printMessage(
// TODO(b/250036454): Use ERROR here instead.
Kind.WARNING,
Kind.ERROR,
"Cannot use legacy dagger.spi.BindingGraphPlugin while compiling with KSP: "
+ legacyPlugin.pluginName()
+ ". Either compile with KAPT or migrate the plugin to implement "
Expand Down
8 changes: 8 additions & 0 deletions java/dagger/spi/model/DaggerProcessingEnv.java
Expand Up @@ -25,12 +25,20 @@
/** Wrapper type for an element. */
@AutoValue
public abstract class DaggerProcessingEnv {
/** Represents a type of backend used for compilation. */
public enum Backend { JAVAC, KSP }

public static DaggerProcessingEnv from(XProcessingEnv processingEnv) {
return new AutoValue_DaggerProcessingEnv(processingEnv);
}

public abstract XProcessingEnv xprocessing();

/** Returns the backend used in this compilation. */
public Backend getBackend() {
return Backend.valueOf(xprocessing().getBackend().name());
}

public ProcessingEnvironment java() {
return toJavac(xprocessing());
}
Expand Down

0 comments on commit e52f7af

Please sign in to comment.