mirror of
https://github.com/google/nomulus.git
synced 2025-06-28 23:33:36 +02:00
Migrate @Provides(type=SET_VALUES) to @ElementsIntoSet
See Rosie [] for context. We've already switched over to using Dagger 2.4 in respositories.bzl, so this change is fine for our open source drop. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=121863923
This commit is contained in:
parent
047bbf186e
commit
b60ceda055
4 changed files with 12 additions and 12 deletions
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
package google.registry.bigquery;
|
package google.registry.bigquery;
|
||||||
|
|
||||||
import static dagger.Provides.Type.SET_VALUES;
|
|
||||||
|
|
||||||
import com.google.api.client.http.HttpRequestInitializer;
|
import com.google.api.client.http.HttpRequestInitializer;
|
||||||
import com.google.api.client.http.HttpTransport;
|
import com.google.api.client.http.HttpTransport;
|
||||||
import com.google.api.client.json.JsonFactory;
|
import com.google.api.client.json.JsonFactory;
|
||||||
|
@ -27,6 +25,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Multibindings;
|
import dagger.Multibindings;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
import dagger.multibindings.ElementsIntoSet;
|
||||||
|
|
||||||
import google.registry.config.ConfigModule.Config;
|
import google.registry.config.ConfigModule.Config;
|
||||||
import google.registry.request.OAuthScopes;
|
import google.registry.request.OAuthScopes;
|
||||||
|
@ -54,7 +53,8 @@ public final class BigqueryModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Provides OAuth2 scopes for the Bigquery service needed by Domain Registry. */
|
/** Provides OAuth2 scopes for the Bigquery service needed by Domain Registry. */
|
||||||
@Provides(type = SET_VALUES)
|
@Provides
|
||||||
|
@ElementsIntoSet
|
||||||
@OAuthScopes
|
@OAuthScopes
|
||||||
static Set<String> provideBigqueryOAuthScopes() {
|
static Set<String> provideBigqueryOAuthScopes() {
|
||||||
return BigqueryScopes.all();
|
return BigqueryScopes.all();
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
package google.registry.export;
|
package google.registry.export;
|
||||||
|
|
||||||
import static dagger.Provides.Type.SET_VALUES;
|
|
||||||
|
|
||||||
import com.google.api.client.http.HttpRequestInitializer;
|
import com.google.api.client.http.HttpRequestInitializer;
|
||||||
import com.google.api.client.http.HttpTransport;
|
import com.google.api.client.http.HttpTransport;
|
||||||
import com.google.api.client.json.JsonFactory;
|
import com.google.api.client.json.JsonFactory;
|
||||||
|
@ -24,6 +22,7 @@ import com.google.api.services.drive.DriveScopes;
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
import dagger.multibindings.ElementsIntoSet;
|
||||||
|
|
||||||
import google.registry.config.ConfigModule.Config;
|
import google.registry.config.ConfigModule.Config;
|
||||||
import google.registry.request.OAuthScopes;
|
import google.registry.request.OAuthScopes;
|
||||||
|
@ -43,7 +42,8 @@ import java.util.Set;
|
||||||
public final class DriveModule {
|
public final class DriveModule {
|
||||||
|
|
||||||
/** Provides OAuth2 scopes for the Drive service needed by Domain Registry. */
|
/** Provides OAuth2 scopes for the Drive service needed by Domain Registry. */
|
||||||
@Provides(type = SET_VALUES)
|
@Provides
|
||||||
|
@ElementsIntoSet
|
||||||
@OAuthScopes
|
@OAuthScopes
|
||||||
static Set<String> provideDriveOAuthScopes() {
|
static Set<String> provideDriveOAuthScopes() {
|
||||||
return DriveScopes.all();
|
return DriveScopes.all();
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
package google.registry.groups;
|
package google.registry.groups;
|
||||||
|
|
||||||
import static dagger.Provides.Type.SET_VALUES;
|
|
||||||
|
|
||||||
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
||||||
import com.google.api.services.admin.directory.Directory;
|
import com.google.api.services.admin.directory.Directory;
|
||||||
import com.google.api.services.admin.directory.DirectoryScopes;
|
import com.google.api.services.admin.directory.DirectoryScopes;
|
||||||
|
@ -23,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
import dagger.multibindings.ElementsIntoSet;
|
||||||
|
|
||||||
import google.registry.config.ConfigModule.Config;
|
import google.registry.config.ConfigModule.Config;
|
||||||
import google.registry.request.DelegatedOAuthScopes;
|
import google.registry.request.DelegatedOAuthScopes;
|
||||||
|
@ -44,7 +43,8 @@ import javax.inject.Named;
|
||||||
public final class DirectoryModule {
|
public final class DirectoryModule {
|
||||||
|
|
||||||
/** Provides OAuth2 scopes for the Directory service needed by Domain Registry. */
|
/** Provides OAuth2 scopes for the Directory service needed by Domain Registry. */
|
||||||
@Provides(type = SET_VALUES)
|
@Provides
|
||||||
|
@ElementsIntoSet
|
||||||
@DelegatedOAuthScopes
|
@DelegatedOAuthScopes
|
||||||
static Set<String> provideDirectoryOAuthScopes() {
|
static Set<String> provideDirectoryOAuthScopes() {
|
||||||
return ImmutableSet.of(
|
return ImmutableSet.of(
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
|
|
||||||
package google.registry.groups;
|
package google.registry.groups;
|
||||||
|
|
||||||
import static dagger.Provides.Type.SET_VALUES;
|
|
||||||
|
|
||||||
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
import com.google.api.client.googleapis.auth.oauth2.GoogleCredential;
|
||||||
import com.google.api.services.groupssettings.Groupssettings;
|
import com.google.api.services.groupssettings.Groupssettings;
|
||||||
import com.google.api.services.groupssettings.GroupssettingsScopes;
|
import com.google.api.services.groupssettings.GroupssettingsScopes;
|
||||||
|
@ -23,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
|
|
||||||
import dagger.Module;
|
import dagger.Module;
|
||||||
import dagger.Provides;
|
import dagger.Provides;
|
||||||
|
import dagger.multibindings.ElementsIntoSet;
|
||||||
|
|
||||||
import google.registry.config.ConfigModule.Config;
|
import google.registry.config.ConfigModule.Config;
|
||||||
import google.registry.request.DelegatedOAuthScopes;
|
import google.registry.request.DelegatedOAuthScopes;
|
||||||
|
@ -44,7 +43,8 @@ import javax.inject.Named;
|
||||||
public final class GroupssettingsModule {
|
public final class GroupssettingsModule {
|
||||||
|
|
||||||
/** Provides OAuth2 scopes for the Groupssettings service needed by Domain Registry. */
|
/** Provides OAuth2 scopes for the Groupssettings service needed by Domain Registry. */
|
||||||
@Provides(type = SET_VALUES)
|
@Provides
|
||||||
|
@ElementsIntoSet
|
||||||
@DelegatedOAuthScopes
|
@DelegatedOAuthScopes
|
||||||
static Set<String> provideGroupssettingsOAuthScopes() {
|
static Set<String> provideGroupssettingsOAuthScopes() {
|
||||||
return ImmutableSet.of(GroupssettingsScopes.APPS_GROUPS_SETTINGS);
|
return ImmutableSet.of(GroupssettingsScopes.APPS_GROUPS_SETTINGS);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue