The FaktoryExtension
/KMMBridgeExtension
has helper methods specific to certain types of artifact and dependency managers. Since these will probably grow and be added to by others, it would make sense to move this config into Kotlin extension methods that live with the implementations.
So, for example, this method is directly in the Gradle extension class:
interface FaktoryExtension
//etc
fun s3Public(
region: String,
bucket: String,
accessKeyId: String,
secretAccessKey: String,
makeArtifactsPublic: Boolean,
altBaseUrl: String?
) {
artifactManager.set(
AwsS3PublicArtifactManager(
region,
bucket,
accessKeyId,
secretAccessKey,
makeArtifactsPublic,
altBaseUrl,
this
)
)
}
//etc
}
It would make more sense to do this in the AwsS3PublicArtifactManager
file:
fun FaktoryExtension.s3Public(
region: String,
bucket: String,
accessKeyId: String,
secretAccessKey: String,
makeArtifactsPublic: Boolean,
altBaseUrl: String?
) {
artifactManager.set(
AwsS3PublicArtifactManager(
region,
bucket,
accessKeyId,
secretAccessKey,
makeArtifactsPublic,
altBaseUrl,
this
)
)
}
class AwsS3PublicArtifactManager(
private val s3Region: String,
private val s3Bucket: String,
//etc
This will allow us to have separate extension modules that don't need to be included in the main module, or possibly even private extensions.