Skip to content

Commit

Permalink
Remove @nullable annotation from aapt2 provider
Browse files Browse the repository at this point in the history
Per #10000, aapt2 is the only
Android asset packaging tool in use, and allowing the provider to be null just
pushes errors downstream.

PiperOrigin-RevId: 284091553
  • Loading branch information
donaldchai authored and copybara-github committed Dec 6, 2019
1 parent adf5ba4 commit f31d471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public AndroidSdkProvider(
FilesToRunProvider mainDexListCreator,
FilesToRunProvider aidl,
FilesToRunProvider aapt,
@Nullable FilesToRunProvider aapt2,
FilesToRunProvider aapt2,
@Nullable FilesToRunProvider apkBuilder,
FilesToRunProvider apkSigner,
FilesToRunProvider proguard,
Expand Down Expand Up @@ -170,7 +170,6 @@ public FilesToRunProvider getAapt() {
}

@Override
@Nullable
public FilesToRunProvider getAapt2() {
return aapt2;
}
Expand Down Expand Up @@ -219,7 +218,7 @@ public AndroidSdkProvider createInfo(
FilesToRunProvider mainDexListCreator,
FilesToRunProvider aidl,
FilesToRunProvider aapt,
Object aapt2,
FilesToRunProvider aapt2,
Object apkBuilder,
FilesToRunProvider apkSigner,
FilesToRunProvider proguard,
Expand All @@ -238,7 +237,7 @@ public AndroidSdkProvider createInfo(
mainDexListCreator,
aidl,
aapt,
fromNoneable(aapt2, FilesToRunProvider.class),
aapt2,
fromNoneable(apkBuilder, FilesToRunProvider.class),
apkSigner,
proguard,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,7 @@ public interface AndroidSdkProviderApi<
@SkylarkCallable(name = "aapt", structField = true, doc = "", documented = false)
FilesToRunProviderT getAapt();

@SkylarkCallable(
name = "aapt2",
structField = true,
doc = "",
documented = false,
allowReturnNones = true)
@Nullable
@SkylarkCallable(name = "aapt2", structField = true, doc = "", documented = false)
FilesToRunProviderT getAapt2();

@SkylarkCallable(
Expand Down Expand Up @@ -222,8 +216,7 @@ public interface Provider<
doc = "A files to run provider of AAPT2.",
positional = true,
named = false,
type = FilesToRunProviderApi.class,
noneable = true),
type = FilesToRunProviderApi.class),
@Param(
name = "apk_builder",
doc = "A files to run provider of the Apk builder.",
Expand Down Expand Up @@ -265,7 +258,7 @@ AndroidSdkProviderApi<FileT, FilesToRunProviderT, TransT> createInfo(
FilesToRunProviderT mainDexListCreator,
FilesToRunProviderT aidl,
FilesToRunProviderT aapt,
/*noneable*/ Object aapt2,
FilesToRunProviderT aapt2,
/*noneable*/ Object apkBuilder,
FilesToRunProviderT apkSigner,
FilesToRunProviderT proguard,
Expand Down

0 comments on commit f31d471

Please sign in to comment.