Add helper task for extra setup after opening in IntelliJ IDEA

This task serves a similar role to the "afterEclipseBuildshipImport"
task used with Eclipse.  It should only be necessary to build this
task once:  in a freshly checked-out tree, just after opening it for
the first time in IntelliJ IDEA.

Ideally this extra setup task would be triggered automatically using
the "Tasks Activation" feature of IntelliJ IDEA's Gradle support.
Unfortunately, "Tasks Activation" settings are recorded in
".idea/workspace.xml", which is used for non-revision-tracked personal
settings.
This commit is contained in:
Ben Liblit 2018-07-06 17:42:29 -05:00
parent 7c2189849f
commit 3d9e4d23d8
3 changed files with 3 additions and 0 deletions

View File

@ -79,6 +79,7 @@ subprojects { subproject ->
jar.manifest.from('META-INF/MANIFEST.MF')
task afterEclipseBuildshipImport(dependsOn: processTestResources)
task afterIntelliJIDEAOpen
test {
include '**/*Test.class'

View File

@ -6,6 +6,7 @@ plugins {
}
eclipse.project.natures 'org.eclipse.pde.PluginNature'
afterIntelliJIDEAOpen.dependsOn jarTest
sourceSets.test.java.srcDirs = ['harness-src/java']

View File

@ -93,6 +93,7 @@ clean.dependsOn cleanCopyDxJar
compileTestJava.dependsOn copyDxJar
afterEclipseBuildshipImport.dependsOn copyDxJar
afterIntelliJIDEAOpen.dependsOn copyDxJar
task copyAndroidJar(type: Sync, dependsOn: installAndroidSdk) {
from "${installAndroidSdk.destinationDir}/platforms/${installAndroidSdk.components['platforms']}/android.jar"