Created
July 18, 2018 13:22
-
-
Save snrostov/ffbe0841abdc0a2c6c41186b4fc7fe85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id "org.jetbrains.gradle.plugin.idea-ext" version "0.3" | |
} | |
| |
import static org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.* | |
import org.jetbrains.gradle.ext.* | |
| |
idea.project { | |
jdkName = '1.8' | |
languageLevel = '1.8' | |
} | |
idea.project.settings { | |
taskTriggers { | |
beforeBuild tasks["tasks"] | |
} | |
delegateActions { | |
delegateBuildRunToGradle false | |
testRunner GRADLE | |
} | |
runConfigurations { | |
"11"(Application) { | |
mainClass "some.MainClass" | |
beforeRun { | |
"myArt"(BuildArtifact) | |
} | |
} | |
"junitTest"(JUnit) { | |
className "some.TEstClass" | |
beforeRun { | |
"myArt"(BuildArtifact) | |
} | |
} | |
"testNgTest"(TestNG) { | |
method "my.pack.ClassTest#testMethod" | |
vmParameters "-Xmx1g -DmyKey=val" | |
} | |
} | |
| |
ideArtifacts { | |
ideArtifact("myArt") { | |
directory("dir1") { | |
file("gradle_lib.iml", "gradlew.bat") | |
} | |
directory("dir2") { | |
archive("some.zip") { | |
file("gradlew") | |
file("settings.gradle") | |
} | |
} | |
directory("dir3") { | |
libraryFiles(project.configurations.compileClasspath) | |
} | |
archive("main.jar") { | |
moduleOutput(idea.module.name) | |
} | |
archive("shadow.jar") { | |
extractedDirectory({ project.configurations.compileClasspath.files }) | |
} | |
} | |
} | |
} | |
| |
task buildMyArt(type: BuildIdeArtifact) { | |
artifact = idea.project.settings.ideArtifacts["myArt"] | |
} | |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment