Re: [Qbs] Undocumented SubProject.condition property

2020-04-17 Thread Christian Kandeler
On Thu, 16 Apr 2020 11:57:08 +
Jochen Ulrich  wrote:

> We found that there is an undocumented `condition` property on SubProject 
> items.
> It seems to have the same effect as setting the `condition` property inside 
> the Properties block.
> However, I find it more readable to have the condition on the SubProject 
> instead of inside the Properties block.
> 
> So the question is: what's the state of this undocumented property?
> Should it be made official and be documented or is it deprecated and will 
> possibly be removed?

I think the property makes sense, if only because most items have one and there 
is no good reason for this one to be different. 


Christian
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] building android aab package help

2020-04-17 Thread Raphael Cotty
The android tool aapt2 manages resources. Some output files required for
the aab package need to be in the protobuf format. Also the R.java
generated by aap2 is different from apk to aab.
That's what I meant by context.
The aab package doesn't need the apk package to be built.

Because both packages need exactly the same input and because some of the
rules are the same (java ones, dex one) I think it makes sense to build
both packages by the same product.

Le ven. 17 avr. 2020 à 09:16, Christian Kandeler 
a écrit :

> [Redirecting back to the mailing list]
>
> On Thu, 16 Apr 2020 20:17:47 +0200
> Raphael Cotty  wrote:
>
> > Le mer. 15 avr. 2020 à 09:48, Christian Kandeler <
> christian.kande...@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
> ___
> Qbs mailing list
> Qbs@qt-project.org
> https://lists.qt-project.org/listinfo/qbs
>
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs


Re: [Qbs] building android aab package help

2020-04-17 Thread Christian Kandeler
[Redirecting back to the mailing list]

On Thu, 16 Apr 2020 20:17:47 +0200
Raphael Cotty  wrote:

> Le mer. 15 avr. 2020 à 09:48, Christian Kandeler 
> 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
___
Qbs mailing list
Qbs@qt-project.org
https://lists.qt-project.org/listinfo/qbs