Skip to content

Commit e52f7af

Browse files
bcorsoDagger Team
authored andcommitted
Internal changes
RELNOTES=N/A PiperOrigin-RevId: 485978563
1 parent ff66535 commit e52f7af

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

java/dagger/internal/codegen/DelegateComponentProcessor.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ public void initialize(
7373
legacyPlugin ->
7474
env.getMessager()
7575
.printMessage(
76-
// TODO(b/250036454): Use ERROR here instead.
77-
Kind.WARNING,
76+
Kind.ERROR,
7877
"Cannot use legacy dagger.spi.BindingGraphPlugin while compiling with KSP: "
7978
+ legacyPlugin.pluginName()
8079
+ ". Either compile with KAPT or migrate the plugin to implement "

java/dagger/spi/model/DaggerProcessingEnv.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,20 @@
2525
/** Wrapper type for an element. */
2626
@AutoValue
2727
public abstract class DaggerProcessingEnv {
28+
/** Represents a type of backend used for compilation. */
29+
public enum Backend { JAVAC, KSP }
30+
2831
public static DaggerProcessingEnv from(XProcessingEnv processingEnv) {
2932
return new AutoValue_DaggerProcessingEnv(processingEnv);
3033
}
3134

3235
public abstract XProcessingEnv xprocessing();
3336

37+
/** Returns the backend used in this compilation. */
38+
public Backend getBackend() {
39+
return Backend.valueOf(xprocessing().getBackend().name());
40+
}
41+
3442
public ProcessingEnvironment java() {
3543
return toJavac(xprocessing());
3644
}

0 commit comments

Comments
 (0)