Skip to content

Instantly share code, notes, and snippets.

@childnode
Last active February 8, 2017 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save childnode/12757be70b2895a1eed0 to your computer and use it in GitHub Desktop.
Save childnode/12757be70b2895a1eed0 to your computer and use it in GitHub Desktop.
gradle idea plugin workaround for dir-based configuration
tasks.withType(GenerateIdeaProject) {
doLast {
copy {
from '.'
into '.idea/'
include '*.ipr'
rename { "modules.xml" }
}
project.delete "${project.name}.ipr"
}
}
tasks.withType(GenerateIdeaWorkspace) {
doLast {
copy {
from '.'
into '.idea/'
include '*.iws'
rename { "workspace.xml" }
}
project.delete "${project.name}.iws"
}
}
@childnode
Copy link
Author

childnode commented Feb 25, 2016

see discussion / Feature Request in -(https://issues.gradle.org/browse/GRADLE-1041)- gradle/gradle#1366

thx to arhan's idea: https://issues.gradle.org/browse/GRADLE-1041?focusedCommentId=17661&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17661

this (should) "fix(es)"

ℹ️ should work with any gradle

⚠️ DOESN'T WORK FOR ME

📍 nice idea, but not seems to work, it should also be much easier to define it via outputFile
see simplified try #2 ➡️ https://gist.github.com/childnode/275dced0705b61381626

further related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment