[Qbs] building android aab package help
Christian Kandeler
christian.kandeler at qt.io
Fri Apr 17 09:14:08 CEST 2020
[Redirecting back to the mailing list]
On Thu, 16 Apr 2020 20:17:47 +0200
Raphael Cotty <raphael.cotty at gmail.com> wrote:
> Le mer. 15 avr. 2020 à 09:48, Christian Kandeler <christian.kandeler at qt.io>
> a écrit :
>
> > Building an aab is similar to building apk. They both take the same inputs
> > > (including java files) and generate a java file (R.java) but in a
> > different
> > > way.
> > >
> > > I first tried to add the android.aab type to the product type property in
> > > order to build both types.
> > > But I can't find a way to redirect all java files + the R.java apk to the
> > > next apk rule and all the java files + R.java aab to the next aab rule
> > > (without changing the java module).
> >
> > I don't understand this part. What is a "next rule"? What do you mean by
> > "redirect"?
>
> If I could duplicate the java modules I'd do this:
> I'd tag all java files in the product to java.java-apk and java.java-aab.
> The the R.java generated for apk will be tagged java.java-apk
> The the R.java generated for aab will be tagged java.java-aab
>
> One copy of the java modules will have this rule:
> [java.java-apk] => [java.class-apk]
> The other copy:
> [java.java-aab] => [java.class-aab]
>
> I'd also have 2 rules for the dex step (identical prepare script)
> [java.class-apk] => [dex-apk]
> [java.class-aab] => [dex-aab]
>
> Then the 2 final steps (different prepare script):
> [dex-apk] => [apk]
> [dex-aab] => [aab]
>
> That's obviously horrible. But that shows the 2 paths.
>
> But can this be done with qbs without to duplication of code?
The answer depends on my earlier question you did not answer:
> > And what is the apk/aab "context"?
> > Are you saying you need to build both the APK and the AAB file? If so,
> > what is the relationship between them?
Christian
More information about the Qbs
mailing list