Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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"]
- }
-
Add Comment
Please, Sign In to add comment