@@ -57,16 +57,16 @@ struct BuildPluginConfig: Codable {
57
57
/// Whether imports should have explicit access levels.
58
58
///
59
59
/// Defaults to `false`.
60
- var useAccessLevelOnImports : Bool
60
+ var accessLevelOnImports : Bool
61
61
62
62
static let defaults = Self (
63
63
accessLevel: . internal,
64
- useAccessLevelOnImports : false
64
+ accessLevelOnImports : false
65
65
)
66
66
67
- private init ( accessLevel: GenerationConfig . AccessLevel , useAccessLevelOnImports : Bool ) {
67
+ private init ( accessLevel: GenerationConfig . AccessLevel , accessLevelOnImports : Bool ) {
68
68
self . accessLevel = accessLevel
69
- self . useAccessLevelOnImports = useAccessLevelOnImports
69
+ self . accessLevelOnImports = accessLevelOnImports
70
70
}
71
71
}
72
72
@@ -159,7 +159,7 @@ extension BuildPluginConfig.GeneratedSource: Codable {
159
159
// Codable conformance with defaults
160
160
enum CodingKeys : String , CodingKey {
161
161
case accessLevel
162
- case useAccessLevelOnImports
162
+ case accessLevelOnImports
163
163
}
164
164
165
165
init ( from decoder: any Decoder ) throws {
@@ -168,9 +168,9 @@ extension BuildPluginConfig.GeneratedSource: Codable {
168
168
self . accessLevel =
169
169
try container. decodeIfPresent ( GenerationConfig . AccessLevel. self, forKey: . accessLevel)
170
170
?? Self . defaults. accessLevel
171
- self . useAccessLevelOnImports =
172
- try container. decodeIfPresent ( Bool . self, forKey: . useAccessLevelOnImports )
173
- ?? Self . defaults. useAccessLevelOnImports
171
+ self . accessLevelOnImports =
172
+ try container. decodeIfPresent ( Bool . self, forKey: . accessLevelOnImports )
173
+ ?? Self . defaults. accessLevelOnImports
174
174
}
175
175
}
176
176
@@ -199,7 +199,7 @@ extension GenerationConfig {
199
199
// hard-code full-path to avoid collisions since this goes into a temporary directory anyway
200
200
self . fileNaming = . fullPath
201
201
self . visibility = buildPluginConfig. generatedSource. accessLevel
202
- self . useAccessLevelOnImports = buildPluginConfig. generatedSource. useAccessLevelOnImports
202
+ self . accessLevelOnImports = buildPluginConfig. generatedSource. accessLevelOnImports
203
203
// Generate absolute paths for the imports relative to the config file in which they are specified
204
204
self . importPaths = buildPluginConfig. protoc. importPaths. map { relativePath in
205
205
configFilePath. deletingLastPathComponent ( ) . absoluteStringNoScheme + " / " + relativePath
0 commit comments