Skip to content
This repository was archived by the owner on Aug 14, 2020. It is now read-only.

Commit 6b5d885

Browse files
Fix gradle plugin (#11)
1 parent abbc60b commit 6b5d885

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

dist/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13381,7 +13381,11 @@ function instrument(allowBeta) {
1338113381
if (!gradleInstrumentatorPath.endsWith(".jar")) {
1338213382
yield io.mv(gradleInstrumentatorPath, gradleInstrumentatorPath + ".jar");
1338313383
}
13384-
yield exec.exec(`sh -c "java -jar ${gradleInstrumentatorPath}.jar ${pluginVersion} ${agentVersion} ${workdir} "`);
13384+
const scopeAgentPath = yield tc.downloadTool(`https://repo1.maven.org/maven2/com/undefinedlabs/scope/scope-agent/${agentVersion}/scope-agent-${agentVersion}.jar`);
13385+
if (!scopeAgentPath.endsWith(".jar")) {
13386+
yield io.mv(scopeAgentPath, scopeAgentPath + ".jar");
13387+
}
13388+
yield exec.exec(`sh -c "java -jar ${gradleInstrumentatorPath}.jar ${pluginVersion} ${scopeAgentPath}.jar ${workdir} "`);
1338513389
});
1338613390
}
1338713391
exports.instrument = instrument;

src/executor.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,10 @@ export async function instrument(allowBeta:boolean): Promise<void> {
1616
await io.mv(gradleInstrumentatorPath, gradleInstrumentatorPath+".jar");
1717
}
1818

19-
await exec.exec(`sh -c "java -jar ${gradleInstrumentatorPath}.jar ${pluginVersion} ${agentVersion} ${workdir} "`);
19+
const scopeAgentPath = await tc.downloadTool(`https://repo1.maven.org/maven2/com/undefinedlabs/scope/scope-agent/${agentVersion}/scope-agent-${agentVersion}.jar`);
20+
if(!scopeAgentPath.endsWith(".jar")) {
21+
await io.mv(scopeAgentPath, scopeAgentPath+".jar");
22+
}
23+
24+
await exec.exec(`sh -c "java -jar ${gradleInstrumentatorPath}.jar ${pluginVersion} ${scopeAgentPath}.jar ${workdir} "`);
2025
}

0 commit comments

Comments
 (0)