mirror of
https://github.com/apple/pkl.git
synced 2026-04-25 09:48:41 +02:00
Add flag to turn power assertions on/off (#1419)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -146,6 +146,10 @@ public abstract class BasePklTask extends DefaultTask {
|
||||
@Optional
|
||||
public abstract MapProperty<URI, URI> getHttpRewrites();
|
||||
|
||||
@Input
|
||||
@Optional
|
||||
public abstract Property<Boolean> getPowerAssertions();
|
||||
|
||||
/**
|
||||
* There are issues with using native libraries in Gradle plugins. As a workaround for now, make
|
||||
* Truffle use an un-optimized runtime.
|
||||
@@ -202,7 +206,8 @@ public abstract class BasePklTask extends DefaultTask {
|
||||
getHttpRewrites().getOrNull(),
|
||||
Map.of(),
|
||||
Map.of(),
|
||||
null);
|
||||
null,
|
||||
getPowerAssertions().getOrElse(false));
|
||||
}
|
||||
return cachedOptions;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -166,7 +166,8 @@ public abstract class ModulesTask extends BasePklTask {
|
||||
getHttpRewrites().getOrNull(),
|
||||
Map.of(),
|
||||
Map.of(),
|
||||
null);
|
||||
null,
|
||||
getPowerAssertions().getOrElse(false));
|
||||
}
|
||||
return cachedOptions;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
* Copyright © 2024-2026 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,6 +41,7 @@ public abstract class TestTask extends ModulesTask {
|
||||
|
||||
public TestTask() {
|
||||
this.getJunitAggregateSuiteName().convention("pkl-tests");
|
||||
this.getPowerAssertions().convention(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user