While working on gradle based project in intellij, many time we want to change its dependency temporarily to local source so that such dependent can be modified and tested locally before publishing and consuming back as artifact/jar. Here is the quick setup I know of:
1. Let's say you have Project A depends on Project B. And you needed some changes on B and test from A. Add following into settings.gradle or build.gradle of Project A
include”:B”finally add compile(project(“:B”)) into build.gradle. If you now open the project A in intellij, you should be able to make necessary changes into project B source and immediately validate on Project A.
project(‘:B’).projectDir=new File(settingsDir,‘ path-to-project-B-root-folder’)
No comments:
Post a Comment