|
7 | 7 |
|
8 | 8 | <properties> |
9 | 9 | <!-- Project settings --> |
10 | | - <java.version>1.8</java.version> |
| 10 | + <java.version>11</java.version> |
11 | 11 | <maven.compiler.target>${java.version}</maven.compiler.target> |
12 | 12 | <maven.compiler.source>${java.version}</maven.compiler.source> |
13 | 13 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|
55 | 55 | <taskmanager.version>1.0.1</taskmanager.version> |
56 | 56 | <google-java-format.version>1.7</google-java-format.version> <!-- Newer versions require Java 11+ --> |
57 | 57 | <disk-lib.version>1.2.0</disk-lib.version> |
| 58 | + <aapt-version>8.12.0-13700139</aapt-version> |
| 59 | + <maven-dependency-plugin>3.6.1</maven-dependency-plugin> |
58 | 60 | </properties> |
59 | 61 |
|
| 62 | + <profiles> |
| 63 | + <profile> |
| 64 | + <id>unpack-aapt2-linux</id> |
| 65 | + <activation> |
| 66 | + <os> |
| 67 | + <family>unix</family> |
| 68 | + <name>linux</name> |
| 69 | + </os> |
| 70 | + </activation> |
| 71 | + <build> |
| 72 | + <plugins> |
| 73 | + <plugin> |
| 74 | + <groupId>org.apache.maven.plugins</groupId> |
| 75 | + <artifactId>maven-dependency-plugin</artifactId> |
| 76 | + <version>${maven-dependency-plugin}</version> |
| 77 | + <executions> |
| 78 | + <execution> |
| 79 | + <id>unpack-linux-aapt2</id> |
| 80 | + <phase>generate-resources</phase> |
| 81 | + <goals> |
| 82 | + <goal>unpack</goal> |
| 83 | + </goals> |
| 84 | + <configuration> |
| 85 | + <artifactItems> |
| 86 | + <artifactItem> |
| 87 | + <groupId>com.android.tools.build</groupId> |
| 88 | + <artifactId>aapt2</artifactId> |
| 89 | + <version>${aapt-version}</version> |
| 90 | + <classifier>linux</classifier> |
| 91 | + <type>jar</type> |
| 92 | + <outputDirectory>${project.build.outputDirectory}/linux</outputDirectory> |
| 93 | + </artifactItem> |
| 94 | + </artifactItems> |
| 95 | + </configuration> |
| 96 | + </execution> |
| 97 | + </executions> |
| 98 | + </plugin> |
| 99 | + </plugins> |
| 100 | + </build> |
| 101 | + </profile> |
| 102 | + |
| 103 | + <profile> |
| 104 | + <id>unpack-aapt2-windows</id> |
| 105 | + <activation> |
| 106 | + <os> |
| 107 | + <family>windows</family> |
| 108 | + </os> |
| 109 | + </activation> |
| 110 | + <build> |
| 111 | + <plugins> |
| 112 | + <plugin> |
| 113 | + <groupId>org.apache.maven.plugins</groupId> |
| 114 | + <artifactId>maven-dependency-plugin</artifactId> |
| 115 | + <version>${maven-dependency-plugin}</version> |
| 116 | + <executions> |
| 117 | + <execution> |
| 118 | + <id>unpack-windows-aapt2</id> |
| 119 | + <phase>generate-resources</phase> |
| 120 | + <goals> |
| 121 | + <goal>unpack</goal> |
| 122 | + </goals> |
| 123 | + <configuration> |
| 124 | + <artifactItems> |
| 125 | + <artifactItem> |
| 126 | + <groupId>com.android.tools.build</groupId> |
| 127 | + <artifactId>aapt2</artifactId> |
| 128 | + <version>${aapt-version}</version> |
| 129 | + <classifier>windows</classifier> |
| 130 | + <type>jar</type> |
| 131 | + <outputDirectory>${project.build.outputDirectory}/windows</outputDirectory> |
| 132 | + </artifactItem> |
| 133 | + </artifactItems> |
| 134 | + </configuration> |
| 135 | + </execution> |
| 136 | + </executions> |
| 137 | + </plugin> |
| 138 | + </plugins> |
| 139 | + </build> |
| 140 | + </profile> |
| 141 | + |
| 142 | + <profile> |
| 143 | + <id>unpack-aapt2-macos</id> |
| 144 | + <activation> |
| 145 | + <os> |
| 146 | + <family>mac</family> |
| 147 | + </os> |
| 148 | + </activation> |
| 149 | + <build> |
| 150 | + <plugins> |
| 151 | + <plugin> |
| 152 | + <groupId>org.apache.maven.plugins</groupId> |
| 153 | + <artifactId>maven-dependency-plugin</artifactId> |
| 154 | + <version>${maven-dependency-plugin}</version> |
| 155 | + <executions> |
| 156 | + <execution> |
| 157 | + <id>unpack-macos-aapt2</id> |
| 158 | + <phase>generate-resources</phase> |
| 159 | + <goals> |
| 160 | + <goal>unpack</goal> |
| 161 | + </goals> |
| 162 | + <configuration> |
| 163 | + <artifactItems> |
| 164 | + <artifactItem> |
| 165 | + <groupId>com.android.tools.build</groupId> |
| 166 | + <artifactId>aapt2</artifactId> |
| 167 | + <version>${aapt-version}</version> |
| 168 | + <classifier>osx</classifier> |
| 169 | + <type>jar</type> |
| 170 | + <outputDirectory>${project.build.outputDirectory}/macos</outputDirectory> |
| 171 | + </artifactItem> |
| 172 | + </artifactItems> |
| 173 | + </configuration> |
| 174 | + </execution> |
| 175 | + </executions> |
| 176 | + </plugin> |
| 177 | + </plugins> |
| 178 | + </build> |
| 179 | + </profile> |
| 180 | + </profiles> |
| 181 | + |
60 | 182 | <repositories> |
61 | 183 | <repository> |
62 | 184 | <id>google</id> |
|
402 | 524 | <version>${disk-lib.version}</version> |
403 | 525 | </dependency> |
404 | 526 |
|
| 527 | + <dependency> |
| 528 | + <groupId>com.android.tools.build</groupId> |
| 529 | + <artifactId>bundletool</artifactId> |
| 530 | + <version>1.18.1</version> |
| 531 | + </dependency> |
| 532 | + |
| 533 | + <dependency> |
| 534 | + <groupId>com.android.tools.build</groupId> |
| 535 | + <artifactId>aapt2-proto</artifactId> |
| 536 | + <version>${aapt-version}</version> |
| 537 | + </dependency> |
| 538 | + |
| 539 | + <dependency> |
| 540 | + <groupId>com.google.protobuf</groupId> |
| 541 | + <artifactId>protobuf-java</artifactId> |
| 542 | + <version>4.31.1</version> |
| 543 | + </dependency> |
| 544 | + |
405 | 545 | <!-- TODO Re-add for Graal.JS support --> |
406 | 546 | <!--<dependency> |
407 | 547 | <groupId>org.graalvm.js</groupId> |
|
506 | 646 | </transformers> |
507 | 647 | </configuration> |
508 | 648 | </plugin> |
| 649 | + <plugin> |
| 650 | + <groupId>org.apache.maven.plugins</groupId> |
| 651 | + <artifactId>maven-dependency-plugin</artifactId> |
| 652 | + <version>${maven-dependency-plugin}</version> |
| 653 | + <executions> |
| 654 | + <execution> |
| 655 | + <id>unpack-aapt2-windows</id> |
| 656 | + <phase>prepare-package</phase> |
| 657 | + <goals> |
| 658 | + <goal>unpack</goal> |
| 659 | + </goals> |
| 660 | + <configuration> |
| 661 | + <artifactItems> |
| 662 | + <artifactItem> |
| 663 | + <groupId>com.android.tools.build</groupId> |
| 664 | + <artifactId>aapt2</artifactId> |
| 665 | + <version>${aapt-version}</version> |
| 666 | + <classifier>windows</classifier> |
| 667 | + <type>jar</type> |
| 668 | + <outputDirectory>${project.build.directory}/unpacked-aapt2/windows</outputDirectory> |
| 669 | + </artifactItem> |
| 670 | + </artifactItems> |
| 671 | + </configuration> |
| 672 | + </execution> |
| 673 | + <execution> |
| 674 | + <id>unpack-aapt2-macos</id> |
| 675 | + <phase>prepare-package</phase> |
| 676 | + <goals> |
| 677 | + <goal>unpack</goal> |
| 678 | + </goals> |
| 679 | + <configuration> |
| 680 | + <artifactItems> |
| 681 | + <artifactItem> |
| 682 | + <groupId>com.android.tools.build</groupId> |
| 683 | + <artifactId>aapt2</artifactId> |
| 684 | + <version>${aapt-version}</version> |
| 685 | + <classifier>osx</classifier> |
| 686 | + <type>jar</type> |
| 687 | + <outputDirectory>${project.build.directory}/unpacked-aapt2/macos</outputDirectory> |
| 688 | + </artifactItem> |
| 689 | + </artifactItems> |
| 690 | + </configuration> |
| 691 | + </execution> |
| 692 | + <execution> |
| 693 | + <id>unpack-aapt2-linux</id> |
| 694 | + <phase>prepare-package</phase> |
| 695 | + <goals> |
| 696 | + <goal>unpack</goal> |
| 697 | + </goals> |
| 698 | + <configuration> |
| 699 | + <artifactItems> |
| 700 | + <artifactItem> |
| 701 | + <groupId>com.android.tools.build</groupId> |
| 702 | + <artifactId>aapt2</artifactId> |
| 703 | + <version>${aapt-version}</version> |
| 704 | + <classifier>linux</classifier> |
| 705 | + <type>jar</type> |
| 706 | + <outputDirectory>${project.build.directory}/unpacked-aapt2/linux</outputDirectory> |
| 707 | + </artifactItem> |
| 708 | + </artifactItems> |
| 709 | + </configuration> |
| 710 | + </execution> |
| 711 | + </executions> |
| 712 | + </plugin> |
| 713 | + <plugin> |
| 714 | + <artifactId>maven-resources-plugin</artifactId> |
| 715 | + <version>3.3.1</version> |
| 716 | + <executions> |
| 717 | + <execution> |
| 718 | + <id>copy-unpacked-aapt2</id> |
| 719 | + <phase>prepare-package</phase> |
| 720 | + <goals> |
| 721 | + <goal>copy-resources</goal> |
| 722 | + </goals> |
| 723 | + <configuration> |
| 724 | + <outputDirectory>${project.build.outputDirectory}</outputDirectory> |
| 725 | + <resources> |
| 726 | + <resource> |
| 727 | + <directory>${project.build.directory}/unpacked-aapt2</directory> |
| 728 | + <!-- This will create windows/, macos/, linux/ inside the classes dir --> |
| 729 | + </resource> |
| 730 | + </resources> |
| 731 | + </configuration> |
| 732 | + </execution> |
| 733 | + </executions> |
| 734 | + </plugin> |
509 | 735 | </plugins> |
510 | 736 | </build> |
511 | 737 |
|
|
0 commit comments