diff --git a/build.sh b/build.sh index 37b5a6978..a8bef1e10 100755 --- a/build.sh +++ b/build.sh @@ -3,4 +3,4 @@ set -e mvn clean install ./plugins/idea/gradlew -b plugins/idea/build.gradle clean buildPlugin mvn -f plugins/eclipse/pom.xml clean install -./plugins/gradle/gradlew -b plugins/gradle/build.gradle clean assemble publishToMavenLocal +./plugins/gradle/gradlew -b plugins/gradle/build.gradle clean assemble validatePlugins publishToMavenLocal diff --git a/plugins/gradle/build.gradle b/plugins/gradle/build.gradle index 7ceb7d61b..2e4200339 100644 --- a/plugins/gradle/build.gradle +++ b/plugins/gradle/build.gradle @@ -1,7 +1,7 @@ plugins { - id "com.github.johnrengelman.shadow" version "8.1.0" + id "com.github.johnrengelman.shadow" version "8.1.1" id "com.gradle.plugin-publish" version "1.2.1" - id 'java' + id 'java-gradle-plugin' id 'groovy' id 'maven-publish' id 'signing' @@ -60,11 +60,7 @@ gradlePlugin { publishing { publications { - mavenJava(MavenPublication) { - groupId = 'com.mobidevelop.robovm' - artifactId = 'robovm-gradle-plugin' - from components.java - + pluginMaven(MavenPublication) { pom { name = 'RoboVM Gradle Plugin' packaging = 'jar' @@ -118,9 +114,6 @@ java { shadowJar { archiveClassifier.set('') - dependencies { - exclude(dependency("com.mobidevelop.robovm:robovm-compiler:${roboVMVersion}")); - } relocate 'org.apache.http', 'com.mobidevelop.robovm.org.apache.http' relocate 'org.apache.commons.io', 'com.mobidevelop.robovm.org.apache.commons.io' relocate 'org.objectweb.asm', 'com.mobidevelop.robovm.asm' @@ -133,7 +126,7 @@ tasks.withType(Javadoc) { signing { required { !version.endsWith('SNAPSHOT') && gradle.taskGraph.hasTask("publish") } - sign publishing.publications.mavenJava + sign publishing.publications.pluginMaven } assemble.dependsOn('shadowJar') diff --git a/plugins/gradle/src/main/java/org/robovm/gradle/tasks/AbstractSimulatorTask.java b/plugins/gradle/src/main/java/org/robovm/gradle/tasks/AbstractSimulatorTask.java index 1504335af..c1ce0a047 100755 --- a/plugins/gradle/src/main/java/org/robovm/gradle/tasks/AbstractSimulatorTask.java +++ b/plugins/gradle/src/main/java/org/robovm/gradle/tasks/AbstractSimulatorTask.java @@ -94,7 +94,6 @@ protected void launch(DeviceType type) { @Internal protected abstract Arch getArch(); - @Internal protected DeviceType getDeviceType(DeviceType.DeviceFamily family) { String deviceName = (String) project.getProperties().get("robovm.device.name"); String sdkVersion = (String) project.getProperties().get("robovm.sdk.version"); diff --git a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java index e6ae51750..38ef3fb07 100755 --- a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java +++ b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java @@ -30,7 +30,6 @@ import org.robovm.compiler.target.ios.ProvisioningProfile; import org.robovm.compiler.target.ios.SigningIdentity; import org.robovm.compiler.util.InfoPList; -import org.robovm.compiler.util.PList; import org.robovm.idea.RoboVmPlugin; import org.robovm.idea.running.RoboVmRunConfiguration.EntryType; import org.robovm.libimobiledevice.IDevice; @@ -194,7 +193,8 @@ protected void applyEditorTo(@NotNull RoboVmRunConfiguration config) throws Conf config.setSigningIdentity(Decorator.from(signingIdentity).id); config.setProvisioningProfileType(Decorator.from(provisioningProfile).entryType); config.setProvisioningProfile(Decorator.from(provisioningProfile).id); - config.setTargetDeviceUDID(Decorator.from(targetDeviceUDID).id); + // TargetDeviceUDID is optional + config.setTargetDeviceUDID(Decorator.idOrNullFrom(targetDeviceUDID)); // simulator related config.setSimulatorArch((CpuArch) simArch.getSelectedItem()); config.setSimulatorType(Decorator.from(simType).entryType); @@ -816,6 +816,15 @@ static Decorator from(JComboBox> cb) { //noinspection unchecked return (Decorator) cb.getSelectedItem(); } + + /** + * @return id from decorator if it presents + */ + static String idOrNullFrom(JComboBox> cb) { + //noinspection unchecked + Decorator decorator = (Decorator) cb.getSelectedItem(); + return decorator != null ? decorator.id : null; + } } /**