2

I'm running project which includes both plain Java (Swing UI) and Android parts, basically source tree consisting 3 parts:

         |---swing  (30% of code)
         |
 src-----|---common (40% of code)
         |
         |---android (30% of code)

How should I define gradle project(s) in order to build from the same sources 2 different apps - one for Java/Swing another one for Android?

I tried different approaches but in the end failed...

Update

If one'd consider 2 or more projects with independent source trees - no problem to implement it - there're number of examples.

Or if to consider 2 projects with the same source tree using the same compiler, again it works with Gradle.

Problem is in implementing gradle project utilizing different compilers on the same source tree.

Barmaley
  • 16,638
  • 18
  • 73
  • 146

1 Answers1

0

Setup 3 modules and import these modules as you want via the settings.gradle files. For more details see https://docs.gradle.org/current/userguide/multi_project_builds.html

and_dev
  • 3,723
  • 1
  • 20
  • 28