Open borisf opened 6 years ago
in build.gradle
dependencies {
...
implementation project(':module4')
// generated
compile project(':androidAppModule1')
}
And in activity
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Set the layout for this activity. You can find it
// in res/layout/hello_activity.xml
setContentView(R.layout.activity_main0);
// generated source
module1packageJava0.Foo0 zzz = new module1packageJava0.Foo0();
zzz.foo0();
// generated resources
setContentView(com.androidAppModule1.R.layout.activity_main2);
}
cc @NikitaKozlov
Is this what is currently generated?
These are my tests, to support the feature fully we need to upgrade the dependencies system, for Android modules to be dependent on other Android modules
Oh, I see. You want us to generate this kind of code? But why then it calls setContentView
twice?
This is the minimal code I generated and updated by hand to understand the scope of generated code, thus setContentView twice is the minimal code to actually use resources from another Android module and activate relevant android gradle plugin mechanisms
Done in "dev" branch
Make Android modules be dependent on other Andorid/Java modules: