mirror of
https://github.com/apple/pkl.git
synced 2026-07-09 14:42:50 +02:00
Change CLI flag and Gradle name for proxy options (#526)
Rationale: "proxy" can mean very different things (e.g. java.lang.reflect.Proxy in Java). This makes the flag name more specific. CLI: * `--proxy` -> `--http-proxy` * `--no-proxy` -> `--http-no-proxy` Gradle: * `proxyAddress` -> `httpProxy` * `noProxy` -> `httpNoProxy`
This commit is contained in:
@@ -282,7 +282,7 @@ public class PklPlugin implements Plugin<Project> {
|
||||
|
||||
spec.getTestPort().convention(-1);
|
||||
|
||||
spec.getNoProxy().convention(List.of());
|
||||
spec.getHttpNoProxy().convention(List.of());
|
||||
}
|
||||
|
||||
private void configureCodeGenSpec(CodeGenSpec spec) {
|
||||
@@ -427,8 +427,8 @@ public class PklPlugin implements Plugin<Project> {
|
||||
task.getModuleCacheDir().set(spec.getModuleCacheDir());
|
||||
task.getEvalTimeout().set(spec.getEvalTimeout());
|
||||
task.getTestPort().set(spec.getTestPort());
|
||||
task.getProxyAddress().set(spec.getProxyAddress());
|
||||
task.getNoProxy().set(spec.getNoProxy());
|
||||
task.getHttpProxy().set(spec.getHttpProxy());
|
||||
task.getHttpNoProxy().set(spec.getHttpNoProxy());
|
||||
}
|
||||
|
||||
private <T extends ModulesTask, S extends ModulesSpec> void configureModulesTask(T task, S spec) {
|
||||
|
||||
@@ -52,7 +52,7 @@ public interface BasePklSpec {
|
||||
|
||||
Property<Integer> getTestPort();
|
||||
|
||||
Property<URI> getProxyAddress();
|
||||
Property<URI> getHttpProxy();
|
||||
|
||||
ListProperty<String> getNoProxy();
|
||||
ListProperty<String> getHttpNoProxy();
|
||||
}
|
||||
|
||||
@@ -127,11 +127,11 @@ public abstract class BasePklTask extends DefaultTask {
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
public abstract Property<URI> getProxyAddress();
|
||||
public abstract Property<URI> getHttpProxy();
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
public abstract ListProperty<String> getNoProxy();
|
||||
public abstract ListProperty<String> getHttpNoProxy();
|
||||
|
||||
@TaskAction
|
||||
public void runTask() {
|
||||
@@ -165,8 +165,8 @@ public abstract class BasePklTask extends DefaultTask {
|
||||
false,
|
||||
getTestPort().getOrElse(-1),
|
||||
Collections.emptyList(),
|
||||
getProxyAddress().getOrNull(),
|
||||
getNoProxy().getOrElse(List.of()));
|
||||
getHttpProxy().getOrNull(),
|
||||
getHttpNoProxy().getOrElse(List.of()));
|
||||
}
|
||||
return cachedOptions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user