Closed devhandle closed 4 years ago
Most of what you are trying to do here...
addConfigurationsFor = { Project forProj ->
if( forProj != project ) {
forProj.configurations.each { Configuration c->
logger.info "${forProj.name}: ${c.name}"
String configName = "${forProj.name}_${c.name}_deps"
project.configurations.create configName
project.syncRemoteRepositories.configurations configName
c.dependencies.each { Dependency d ->
logger.info "Found ${d} in ${forProj.name}. Adding to ${configName}"
project.dependencies.add configName, d
}
}
forProj.childProjects.each { String projName, Project p ->
addConfigurationsFor(p)
}
}
}
... can probably be achieved by simply doing syncRemoteProjects.addAllProjects()
Closing this as it has been open for a long time and the suggestion should have solved the problem.
I'm struggling to get the plugin to work with my project. My project is a simple test project with a single app. Running
./gradlew syncRemoteRepositories
succeeds and creates a repo directory under my project (myapp/repo
) but when I run./gradlew assembleDebug --offline
I see the error message below. The error is correct because the location does not exist in my offline repo - the only 'aapt2' folder is this onefile:/myapp/repo/com.android.tools.build/aapt2-proto/0.3.1/
Any ideas on how I can fix this because I've been fighting with it for last few days. I've also pasted my build.gradle below