aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/java/JavaModule.qbs
Commit message (Collapse)AuthorAgeFilesLines
* Use Host and FileInfo serviceRaphael Cotty2022-01-311-2/+3
| | | | | | | | Replace all the possible use of the qbs module that can be replaced by the Host and FileInfo services. Change-Id: I0d6f820bb2577eacd9081ec2df1eb53adf94d50e Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* Fix descriptions for JS commandsDenis Shienkov2021-11-151-1/+1
| | | | | | | | | | | * All descriptions start with a small letter. * Trailing dots have been removed from all descriptions. * For all static library rules replaced 'linking' with 'creating' in descriptions. * Added 'ing' ending to all descriptions where it was missing. Change-Id: I2a4cb9dd53980d33628e097efaae53a68573af42 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Merge branch '1.18'Ivan Komissarov2021-02-191-2/+6
|\ | | | | | | Change-Id: I4e437865514add88558f66420718bc02fb39e41d
| * Qt/Android: Extend rule cycle prevention hackChristian Kandeler2021-01-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | After we did remove the hpp tag from the java-generated header, it was re-added by a file tagger in the cpp modules file, leading to an unexpected state on rebuilding. Fix this by replacing the tag, rather than removing it. Fixes: QBS-1628 Change-Id: I9d182cd30cf9a637733b84234e7a0b37f7583334 Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
* | Test for array-like objects with instanceof ArrayRichard Weickelt2021-02-151-1/+1
|/ | | | | | | | | | Array.isArray() seemed to work for arrays created in scripts as well as for QStringList and QVariantList created in C++ when using QtScript. QJSEngine is more strict (see the comments in QTBUG-45018). One way to work around that problem is to use instanceof Array instead. Change-Id: I0f1c8757a5ab2f82e26eff19a8b5ecf667bb04b1 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix javac version detectionIvan Komissarov2019-06-141-2/+2
| | | | | | | It seems, that javac -version can return "12" instead of "12.0.0" Change-Id: I804cbadb410dc11f566fda122f3082a8607ebb36 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Properly support building Qt apps for AndroidChristian Kandeler2018-11-161-2/+12
| | | | | | | | ... via the androiddeployqt tool. Fixes: QBS-991 Change-Id: I4a3abe977fee6a9d1657a4fd6c1b43709429da9f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Remove the base module import from shared imports and modulesJoerg Bornemann2018-06-221-1/+0
| | | | | Change-Id: I5270e033dc41b5bd76a417099514c69cc073008b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Java: Adapt to Java 9 changesChristian Kandeler2018-02-051-4/+11
| | | | | | | | | | | | | | | - tools.jar and rt.jar are gone - The -bootclasspath option is not allowed when targeting Java 9 - JavaCompiler.isSupportedOption() (erroneously?) returns 1 instead of 0 for -Xlint - version number related changes: - major version has jumped to 9 - javac prints the version number to stdout rather than stderr - version number no longer contains a forth component - The -source and -target options take only the major version Change-Id: I0b23c8868db7aeaa06785ee43c1efd9fcb1bc9d2 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Remove usage of deprecated apkbuilder toolJake Petroules2017-09-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead, we use aapt and apksigner/jarsigner. For the most part, ApkBuilder is simply a "dumb copy" machine. It takes the initial .ap_ (which is merely a ZIP archive) and adds the dex output and native shared libraries to it (-z and -nf options). We now just put all of these an a properly structured directory and tell aapt to package it. The sole purpose of "debug mode" (-d) is to determine whether to copy gdbserver in, but Qbs already handles this bit by not copying it to the input directory in the first place for release builds. Finally, apkbuilder signs the APK with the Android debug keystore by default. We instead defer that task to the purpose built and more flexible apksigner, or jarsigner from the JDK as a fallback for older versions of the Android SDK Build Tools. No functionality is lost, and this also helps pave the way for adding aar support as this will rely heavily on aapt as well. Note that there are now *two* invocations of aapt. One to generate R.java (which then gets compiled to a .class file and later added to the dex output), and one to actually package the APK from the assets, resources, dex output, native libraries, and manifest. Change-Id: I0fd6a2ea598856d38316a3f0c8ae15a67693ddfb Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Split off JdkVersionProbeJoerg Bornemann2017-09-071-2/+8
| | | | | | | | ...because detecting the JDK's location and version in one probe makes it impossible to set java.jdkPath in a profile. Change-Id: Ifc2c87f05021551ef4eb3b3d42785f116cd3c551 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Change type of java.jdkPath from path to stringJoerg Bornemann2017-09-071-1/+1
| | | | | | | | The JDK is usually not located below the project root. A path property is not useful here. Change-Id: I2e150d0dfe0e9d925ff242b4fa46a606d750753e Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Remove java.manifestFileJoerg Bornemann2017-08-211-1/+0
| | | | | | | This property was scheduled for removal in 1.9 already. Change-Id: I303a89e421575c01911222c9a53386639492a294 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove java.manifestFileJoerg Bornemann2017-05-251-8/+0
| | | | | | | | This property was deprecated and is to be removed in 1.9. Change-Id: I2465544cee921c9deb8af68bb459718e517a3065 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Track Java manifest files as artifacts in the build graphJake Petroules2017-05-091-7/+37
| | | | | Change-Id: I4e5df616d49b51286a3df83f11807408b59c4fe3 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix javaDependencyTracking autotest with Java 6 on Windows and LinuxJake Petroules2016-12-191-6/+20
| | | | | | | | Both rt.jar *and* tools.jar are part of classes.jar in Apple Java 6, not only the former. tools.jar is present in all other versions of the JDK. Change-Id: Ia045d17c768963fd454f0ed81d95940c4a33d2b7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Modules: Adapt to introduction of built-in "version" propertyChristian Kandeler2016-10-191-0/+1
| | | | | | | | - Remove redefinitions of the property. - Set the property, where applicable. Change-Id: Ie3f4bd3c4cc9b809667287045c10b22ff6b71e21 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Fix the input values of some ProbesChristian Kandeler2016-08-311-1/+1
| | | | | | | The value "undefined" could get into input arrays. Change-Id: I4f2fb6b076b0d11cd56717d16f9dc6be41bed252 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Merge 1.5 into 1.6Jake Petroules2016-06-281-1/+1
|\ | | | | | | Change-Id: If1a2c368170d89d5e6e11b08a32b37901d51eb1d
| * Do the OS X to macOS rename.v1.5.2Jake Petroules2016-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog] The "osx" value in qbs.hostOS and qbs.targetOS has been replaced with "macos". For backwards compatibility, qbs.hostOS will still contain "osx" in addition to "macos", and an error will be printed if qbs.targetOS contains "osx" but not "macos". Specifying "macos" without "osx" is allowed. These checks are subject to be removed in a future version of qbs, so update your hostOS and targetOS checks accordingly. [ChangeLog] cpp.minimumOsxVersion has been deprecated and replaced with cpp.minimumMacosVersion. cpp.minimumOsxVersion is subject to be removed in a future version of qbs, so update your projects accordingly. Change-Id: I479891829dff6eb6750cb2a04e1395f085896f63 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Allow Java dependency tracking to work without actually compiling.Jake Petroules2016-06-091-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the Java compiler APIs to traverse the AST of the Java code to find type elements and get their corresponding binary names (i.e. base names of the generated class files). Because this method does not require the source files to be compiled, a complete* list of output artifacts can be retrieved even if some dependencies are missing, as long as the source is well-formed. *No attempt is made to handle annotation processors which generate additional source files. Qbs has not previously supported this anyways. It may do so in the future. Change-Id: I9e4231071618c020f1087c455d436cdb14c1f8e9 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Merge remote-tracking branch 'origin/1.5'Joerg Bornemann2016-06-081-1/+1
|\| | | | | | | | | | | | | | | Conflicts: doc/reference/items/transformer.qdoc share/qbs/modules/cpp/GenericGCC.qbs Change-Id: I45560834560019b18274c373c45651eb8aadd206
| * Replace 'the Qt build suite' with 'Qbs' in copyright notices.Jake Petroules2016-06-061-1/+1
| | | | | | | | | | | | Change-Id: I885d94bb14b325dc36767a840ebdb0be1fb59dd2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Provide the ability to let commands bypass dry-run mode.Jake Petroules2016-06-011-0/+1
|/ | | | | | | | | This allows these commands to run even in dry-run mode. This is for internal use ONLY in building the helper tools for Java, TypeScript, etc., dependency tracking and is not intended to be exposed to users. Change-Id: I36130131363aa6247f10b9824726f73df9d7031f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add manifest support in Java module.Jake Petroules2015-07-221-3/+66
| | | | | | | | | The existing manifest property was never declared, so this never worked in the first place. Additionally, add aggregation capabilities similar to how Info.plist is handled in the DarwinGCC module. Change-Id: I93e35936bdfd271adc2892bf2288d2f66d4f87a8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Make project resolving with the Java module significantly faster.Jake Petroules2015-07-151-16/+9
| | | | | | | | | | | | Building the qbs "vehicles" test would previously invoke javac -version 159 times due to repeated indirect evaluations of java.rawCompilerVersion when running the java module's validate script. Now javac -version is only run once each time the java module is loaded (4 times in the vehicles test, once for each product). Change-Id: I662d2e5a87b40e64532410f1cbe7ed7f6e3aac78 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Solve the Java dependency tracking issue once and for all.Jake Petroules2015-07-091-1/+40
| | | | | | | | | | | | | | | | | | | This approach relies on the newly introduced ability of Modules to contain Groups, which may add additional source files to a Product. In the case of the Java module, the module includes a group which adds some sources to build a helper tool on-demand for each product that builds Java source code. This deviates from the previous approach of supplying a single jar for the entire qbs distribution and is thus somewhat less efficient, but is not expected to be a critical issue in the short term. To start, it solves two critical issues: the build-time dependency on javac, which complicates the qbs build process unnecessarily, and the bootstrap class path warning due to targeting Java 1.6 with newer JDKs. Change-Id: I533214a5d37fd69a4d8bfcf0db36bc7dae821d5f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Automatically detect JDK in the Java module.Jake Petroules2015-06-301-1/+1
| | | | | Change-Id: I33e8ecf3e08a402fd4b1e836c28818c91bc6f61d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Introduce java.jdkIncludePaths property.Jake Petroules2015-06-291-0/+21
| | | | | Change-Id: I1f53474502f65f6e4973f95ce43fb16490d57686 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Make java.jdkPath actually refer to what the name suggests.Jake Petroules2015-06-251-3/+4
| | | | | | | | | | The JDK path (i.e. $JAVA_HOME) should be the base path of the JDK, rather than the bin directory within it. The JDK has a well-defined layout, which allows meaningful path concatenations to be performed in order to locate resources within it. Change-Id: I8274e975322cda6bc2b3e3143ae6c80963f368b5 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add 'm' flag to javac compiler version regex.Jake Petroules2015-06-171-1/+2
| | | | | | | The compiler version is not always on the first line. Change-Id: I3fe3f2b2ed7be3e719ae41ae61eb4306af4563ac Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add support for tracking class, h files produced by Java inner classes.Jake Petroules2015-05-281-14/+2
| | | | | | | | | | This also resolves the "perfect parsing" issue and so determining output file paths for Java class files won't be fooled by comments, etc. Feel free to use NULLs, unpaired surrogates, emoji, etc! Task-number: QBS-228 Change-Id: I3576a9a8e51a717ab8159db35f1a01e3ad91df88 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Fix error message for undefined Java JDK path.Jake Petroules2015-05-191-1/+2
| | | | | Change-Id: I05a4fea7f043d45c40778303dc914659cd37a65c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Add support for determining the Java compiler version.Jake Petroules2015-05-111-0/+36
| | | | | Change-Id: I2a34759fb57284f9d002d81a06997fdb02a95f06 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Refactor javac arguments into the JS file to prepare for fixes.Jake Petroules2015-05-081-34/+2
| | | | | Change-Id: Ibfd1740fe2a28da0f6b21132038df96819660109 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* add missing license headersJoerg Bornemann2015-04-151-0/+30
| | | | | | Change-Id: I49d8886b0f9811fb9a8b6e33cb7974534b4a1b35 Task-number: QBS-750 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add additionalJarFlags to Java module for JAR files.Jake Petroules2015-02-051-0/+5
| | | | | Change-Id: Iacc76c2ba2d1a8c09db75a194c6d092f9690d70f Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Allow JAR files as dependencies of other Java products.Jake Petroules2015-02-031-2/+6
| | | | | | | | This lets a JAR file or class file collection "link" to another JAR file by adding that JAR to its classpath. This is now tested as well. Change-Id: I9b81db84e93113d750c1897f03a0d016ca0e3ec2 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Fix JAR file generation in Java module.Jake Petroules2015-02-031-1/+3
| | | | | | | | The class file paths must be specified relative to the class files directory, or the full path starting from / gets embedded in the JAR. Change-Id: Id33dc5690a3dfa8d4e8619f3f599e408c431de36 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Fix typo in Java module causing release builds to fail.Jake Petroules2015-01-091-1/+1
| | | | | Change-Id: Iaa77ed2ed4f81323947ff0e816f7bc9e271943dd Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Add Java support.Jake Petroules2014-12-181-0/+136
Task-number: QBS-228 Change-Id: I00e853087e8622fd1c73e7930d0ffd506aa56173 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>