Skip to content

Commit

Permalink
IDE-5116 add windows code sign support
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjhy committed Nov 22, 2023
1 parent c12d6fe commit e05d6b1
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
./csf.sh
Verify:
name: Verify
runs-on: macos-latest
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout liferay-ide
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,8 @@ ${java_executable}
<startMenuGroupName></startMenuGroupName>
<vendor>Liferay, Inc</vendor>
<width>600</width>
<!-- <windowsSigningPkcs12File>${build_project_directory}/liferay.pfx</windowsSigningPkcs12File>
<windowsSigningPkcs12Password>${env(WINDOWS_SIGNING_PASSWORD)}</windowsSigningPkcs12Password> -->
<parameterList>
<fileParameter>
<name>java_executable</name>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.JavaRuntime;

import org.gradle.tooling.CancellationTokenSource;
Expand Down Expand Up @@ -341,15 +342,18 @@ public static String runGradleTask(
GradleBuild gradleBuild = gradleBuildOpt.get();

try {
IVMInstall defaultVMInstall = JavaRuntime.getDefaultVMInstall();

File jvmInstallLocation = defaultVMInstall.getInstallLocation();

if (redirectOutput) {
OutputStream outputStream = new ByteArrayOutputStream();

gradleBuild.withConnection(
connection -> {
connection.newBuild(
).setJavaHome(
JavaRuntime.getDefaultVMInstall(
).getInstallLocation()
jvmInstallLocation
).addArguments(
arguments
).forTasks(
Expand All @@ -371,8 +375,7 @@ public static String runGradleTask(
connection -> {
connection.newBuild(
).setJavaHome(
JavaRuntime.getDefaultVMInstall(
).getInstallLocation()
jvmInstallLocation
).addArguments(
arguments
).forTasks(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static void waitForBuildAndValidation() throws Exception {
manager.join(ValidatorManager.VALIDATOR_JOB_FAMILY, new NullProgressMonitor());
manager.join(ResourcesPlugin.FAMILY_AUTO_BUILD, new NullProgressMonitor());
JobUtil.waitForLiferayProjectJob();
Thread.sleep(200);
Thread.sleep(500);
manager.beginRule(root = workspace.getRoot(), null);
}
catch (InterruptedException ie) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void testNewLiferayModuleProjectNameValidataionService() throws Exception
{
NewLiferayModuleProjectOp op = NewLiferayModuleProjectOp.TYPE.instantiate();

op.setProjectName( "my-test-project" );
op.setProjectName( "my-test-project-validataionService" );

assertTrue( op.validation().ok() );

Expand Down Expand Up @@ -229,7 +229,7 @@ public void testNewLiferayModuleProjectNewProperties() throws Exception

Status exStatus =
NewLiferayModuleProjectOpMethods.execute( op, ProgressMonitorBridge.create( new NullProgressMonitor() ) );

assertEquals( "OK", exStatus.message() );

TestUtil.waitForBuildAndValidation();
Expand Down Expand Up @@ -265,6 +265,8 @@ public void testNewLiferayPanelAppNewProperties() throws Exception
Status exStatus =
NewLiferayModuleProjectOpMethods.execute( op, ProgressMonitorBridge.create( new NullProgressMonitor() ) );

TestUtil.waitForBuildAndValidation();

assertTrue( exStatus.message(), exStatus.ok() );

IProject modPorject = CoreUtil.getProject( op.getProjectName().content() );
Expand Down

0 comments on commit e05d6b1

Please sign in to comment.