Obsolete
Status Update
Comments
uc...@google.com <uc...@google.com>
le...@google.com <le...@google.com>
je...@google.com <je...@google.com>
cm...@google.com <cm...@google.com> #2
We use build flavours heavily with a lot of common code. The refactoring support in AS is really good but it continually catches us out when it doesn't work across all flavours in a project. It's a big gap for serious product development.
dr...@gmail.com <dr...@gmail.com> #3
We at my company need this same feature. We have a lot of white labels and need refactor the same class across flavours. :(
so...@google.com <so...@google.com> #4
I need this feature too...
Description
1. Create module (for example: testtools) with jar files. Example of content of module build.gralde file:
```
configurations.maybeCreate("default")
artifacts.add("default", file('byte-buddy-1.6.14.jar'))
artifacts.add("default", file('byte-buddy-agent-1.6.14.jar'))
artifacts.add("default", file('cglib-nodep-2.2.2.jar'))
artifacts.add("default", file('hamcrest-core-1.3.jar'))
artifacts.add("default", file('javassist-3.21.0-GA.jar'))
artifacts.add("default", file('mockito-core-2.8.9.jar'))
artifacts.add("default", file('objenesis-2.5.jar'))
artifacts.add("default", file('powermock-mockito2-1.7.1-full.jar'))
```
2. Add dependency to application module like:
```
testImplementation project(':testtools')
```
Actual result:
You cannot import classes from added jar libraries inside test clases
Expected result:
Classes from added jar files can be imported.
Other notes:
If I add files jar files through next code: `testImplementation fileTree(include: ['*.jar'], dir: 'testLibsFolder')` then they works fine. Also in Android Studio 3.1.4 with gradle 3.4 adding dependency from module works fine.
------------------------------------
System info:
Build: 3.2, AI-181.5540.7.32.5014246, 201809171917,
AI-181.5540.7.32.5014246, JRE 1.8.0_152-release-1136-b06x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.6 unknown, screens 1440x900, 1920x1080, 1920x1080
Android Gradle Plugin: 3.2.0
Gradle: 4.6
NDK: from local.properties: 18.0.5002713; latest from SDK: 18.0.5002713;
LLDB: LLDB 3.1 (revision: 3.1.4508709)
CMake: from local.properties: (not specified); latest from SDK: 3.6.0-rc2; from PATH: (not found);
--------------------------------