Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes classloader stuff surprisingly...
  • Loading branch information
ntwigg
ntwigg committed Aug 23, 2025
commit 36c9cb33eccd814a15251738c9fa4f3d94fb8c83
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.diffplug.webtools.node;
package com.diffplug.webtools;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import com.diffplug.common.base.Errors;
import com.diffplug.common.base.Throwables;
import com.diffplug.common.base.Throwing;
import com.diffplug.webtools.node.SetupCleanup;
import com.diffplug.webtools.SetupCleanup;
import com.google.common.collect.ImmutableList;
import com.google.common.io.ByteStreams;
import com.google.common.io.Files;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/com/diffplug/webtools/node/NodePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.gradle.api.tasks.TaskAction;
import org.gradle.api.tasks.TaskProvider;
import org.gradle.work.DisableCachingByDefault;
import webtools.Env;

/**
* Installs a specific version of node.js and npm,
Expand All @@ -49,6 +50,14 @@ public Extension(Project project) {
this.project = Objects.requireNonNull(project);
}

public boolean envIsHerokuBuild() {
return Env.isHerokuBuild();
}

public boolean envIsGitHubAction() {
return Env.isGitHubAction();
}

public TaskProvider<?> npm_run(String name, Action<NpmRunTask> taskConfig) {
return project.getTasks().register("npm_run_" + name.replace(':', '-'), NpmRunTask.class, task -> {
task.npmTaskName = name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package com.diffplug.webtools.node;

import com.diffplug.common.swt.os.OS;
import com.diffplug.webtools.SetupCleanup;
import com.github.eirslett.maven.plugins.frontend.lib.FrontendPluginFactory;
import com.github.eirslett.maven.plugins.frontend.lib.InstallationException;
import com.github.eirslett.maven.plugins.frontend.lib.ProxyConfig;
Expand Down
Loading