Guest User

Untitled

a guest
Jul 18th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. plugins {
  2. id "org.jetbrains.gradle.plugin.idea-ext" version "0.3"
  3. }
  4. import static org.jetbrains.gradle.ext.ActionDelegationConfig.TestRunner.*
  5. import org.jetbrains.gradle.ext.*
  6. idea.project {
  7. jdkName = '1.8'
  8. languageLevel = '1.8'
  9. }
  10. idea.project.settings {
  11. taskTriggers {
  12. beforeBuild tasks["tasks"]
  13. }
  14. delegateActions {
  15. delegateBuildRunToGradle false
  16. testRunner GRADLE
  17. }
  18. runConfigurations {
  19. "11"(Application) {
  20. mainClass "some.MainClass"
  21. beforeRun {
  22. "myArt"(BuildArtifact)
  23. }
  24. }
  25. "junitTest"(JUnit) {
  26. className "some.TEstClass"
  27. beforeRun {
  28. "myArt"(BuildArtifact)
  29. }
  30. }
  31. "testNgTest"(TestNG) {
  32. method "my.pack.ClassTest#testMethod"
  33. vmParameters "-Xmx1g -DmyKey=val"
  34. }
  35. }
  36. ideArtifacts {
  37. ideArtifact("myArt") {
  38. directory("dir1") {
  39. file("gradle_lib.iml", "gradlew.bat")
  40. }
  41. directory("dir2") {
  42. archive("some.zip") {
  43. file("gradlew")
  44. file("settings.gradle")
  45. }
  46. }
  47. directory("dir3") {
  48. libraryFiles(project.configurations.compileClasspath)
  49. }
  50. archive("main.jar") {
  51. moduleOutput(idea.module.name)
  52. }
  53. archive("shadow.jar") {
  54. extractedDirectory({ project.configurations.compileClasspath.files })
  55. }
  56. }
  57. }
  58. }
  59. task buildMyArt(type: BuildIdeArtifact) {
  60. artifact = idea.project.settings.ideArtifacts["myArt"]
  61. }
Add Comment
Please, Sign In to add comment