mirror of
https://github.com/apple/pkl.git
synced 2026-04-23 08:48:36 +02:00
Change Gradle property to "rename" (#528)
This changes the property to match the name of the CLI flag.
This commit is contained in:
@@ -412,7 +412,7 @@ public class PklPlugin implements Plugin<Project> {
|
||||
task.getOutputDir().set(spec.getOutputDir());
|
||||
task.getGenerateSpringBootConfig().set(spec.getGenerateSpringBootConfig());
|
||||
task.getImplementSerializable().set(spec.getImplementSerializable());
|
||||
task.getPackageMapping().set(spec.getPackageMapping());
|
||||
task.getRenames().set(spec.getRenames());
|
||||
}
|
||||
|
||||
private <T extends BasePklTask, S extends BasePklSpec> void configureBaseTask(T task, S spec) {
|
||||
|
||||
@@ -32,5 +32,5 @@ public interface CodeGenSpec extends ModulesSpec {
|
||||
|
||||
Property<Boolean> getImplementSerializable();
|
||||
|
||||
MapProperty<String, String> getPackageMapping();
|
||||
MapProperty<String, String> getRenames();
|
||||
}
|
||||
|
||||
@@ -35,5 +35,5 @@ public abstract class CodeGenTask extends ModulesTask {
|
||||
public abstract Property<Boolean> getImplementSerializable();
|
||||
|
||||
@Input
|
||||
public abstract MapProperty<String, String> getPackageMapping();
|
||||
public abstract MapProperty<String, String> getRenames();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class JavaCodeGenTask extends CodeGenTask {
|
||||
getParamsAnnotation().getOrNull(),
|
||||
getNonNullAnnotation().getOrNull(),
|
||||
getImplementSerializable().get(),
|
||||
getPackageMapping().get()))
|
||||
getRenames().get()))
|
||||
.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public abstract class KotlinCodeGenTask extends CodeGenTask {
|
||||
getGenerateKdoc().get(),
|
||||
getGenerateSpringBootConfig().get(),
|
||||
getImplementSerializable().get(),
|
||||
getPackageMapping().get()))
|
||||
getRenames().get()))
|
||||
.run();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class JavaCodeGeneratorsTest : AbstractTest() {
|
||||
paramsAnnotation = "javax.inject.Named"
|
||||
nonNullAnnotation = "javax.annotation.Nonnull"
|
||||
settingsModule = "pkl:settings"
|
||||
packageMapping = [
|
||||
renames = [
|
||||
'org': 'foo.bar'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ class KotlinCodeGeneratorsTest : AbstractTest() {
|
||||
sourceModules = ["mod.pkl"]
|
||||
outputDir = file("build/generated")
|
||||
settingsModule = "pkl:settings"
|
||||
packageMapping = [
|
||||
renames = [
|
||||
'org.': 'foo.bar.'
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user