1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 Copyright 2012 Google LLC 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 18 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 19 <modelVersion>4.0.0</modelVersion> 20 21 <parent> 22 <groupId>com.google.auto.value</groupId> 23 <artifactId>auto-value-parent</artifactId> 24 <version>HEAD-SNAPSHOT</version> 25 </parent> 26 27 <artifactId>auto-value</artifactId> 28 <version>HEAD-SNAPSHOT</version> 29 <name>AutoValue Processor</name> 30 <description> 31 Immutable value-type code generation for Java 1.7+. 32 </description> 33 <url>https://github.com/google/auto/tree/main/value</url> 34 35 <scm> 36 <url>http://github.com/google/auto</url> 37 <connection>scm:git:git://github.com/google/auto.git</connection> 38 <developerConnection>scm:git:ssh://[email protected]/google/auto.git</developerConnection> 39 <tag>HEAD</tag> 40 </scm> 41 42 <properties> 43 <auto-service.version>1.1.1</auto-service.version> 44 <errorprone.version>2.21.1</errorprone.version> 45 </properties> 46 47 <dependencies> 48 <dependency> 49 <groupId>com.google.auto</groupId> 50 <artifactId>auto-common</artifactId> 51 <version>1.2.2</version> 52 </dependency> 53 <dependency> 54 <groupId>com.google.auto.service</groupId> 55 <artifactId>auto-service-annotations</artifactId> 56 <version>${auto-service.version}</version> 57 </dependency> 58 <dependency> 59 <groupId>com.google.errorprone</groupId> 60 <artifactId>error_prone_annotations</artifactId> 61 <version>${errorprone.version}</version> 62 </dependency> 63 <dependency> 64 <groupId>com.google.escapevelocity</groupId> 65 <artifactId>escapevelocity</artifactId> 66 <version>1.1</version> 67 </dependency> 68 <dependency> 69 <groupId>net.ltgt.gradle.incap</groupId> 70 <artifactId>incap</artifactId> 71 <version>1.0.0</version> 72 </dependency> 73 <dependency> 74 <groupId>com.google.guava</groupId> 75 <artifactId>guava</artifactId> 76 </dependency> 77 <dependency> 78 <groupId>com.squareup</groupId> 79 <artifactId>javapoet</artifactId> 80 </dependency> 81 <dependency> 82 <groupId>org.jetbrains.kotlinx</groupId> 83 <artifactId>kotlinx-metadata-jvm</artifactId> 84 <version>0.7.0</version> 85 </dependency> 86 <dependency> 87 <groupId>org.ow2.asm</groupId> 88 <artifactId>asm</artifactId> 89 <version>9.5</version> 90 </dependency> 91 <!-- test dependencies --> 92 <dependency> 93 <groupId>com.google.auto.value</groupId> 94 <artifactId>auto-value-annotations</artifactId> 95 <version>${project.version}</version> 96 <scope>test</scope> 97 </dependency> 98 <dependency> 99 <groupId>com.google.errorprone</groupId> 100 <artifactId>error_prone_type_annotations</artifactId> 101 <version>${errorprone.version}</version> 102 <scope>test</scope> 103 </dependency> 104 <dependency> 105 <groupId>com.google.guava</groupId> 106 <artifactId>guava-testlib</artifactId> 107 <scope>test</scope> 108 </dependency> 109 <dependency> 110 <groupId>junit</groupId> 111 <artifactId>junit</artifactId> 112 <scope>test</scope> 113 </dependency> 114 <dependency> 115 <groupId>com.google.truth</groupId> 116 <artifactId>truth</artifactId> 117 <scope>test</scope> 118 </dependency> 119 <dependency> 120 <groupId>com.google.truth.extensions</groupId> 121 <artifactId>truth-java8-extension</artifactId> 122 <scope>test</scope> 123 </dependency> 124 <dependency> 125 <groupId>com.google.testing.compile</groupId> 126 <artifactId>compile-testing</artifactId> 127 <scope>test</scope> 128 </dependency> 129 </dependencies> 130 131 <build> 132 <sourceDirectory>../src/main/java</sourceDirectory> 133 <testSourceDirectory>../src/test/java</testSourceDirectory> 134 135 <resources> 136 <resource> 137 <directory>../src/main/java</directory> 138 <includes> 139 <include>**/*.vm</include> 140 </includes> 141 </resource> 142 </resources> 143 <plugins> 144 <plugin> 145 <groupId>org.apache.maven.plugins</groupId> 146 <artifactId>maven-compiler-plugin</artifactId> 147 <configuration> 148 <includes> 149 <include>com/google/auto/value/processor/**/*.java</include> 150 <include>com/google/auto/value/extension/memoized/processor/**/*.java</include> 151 <include>com/google/auto/value/extension/serializable/processor/**/*.java</include> 152 <include>com/google/auto/value/extension/serializable/serializer/**/*.java</include> 153 <include>com/google/auto/value/extension/toprettystring/processor/**/*.java</include> 154 </includes> 155 <compilerArgs> 156 <!-- This is something of a hack to allow tests to pass. Ideally we would build 157 TestStringSerializerFactory as a separate artifact, to avoid a problem when it 158 is built at the same time as @AutoValue classes that might end up finding it. 159 But by allowing a missing class to be ignored, we avoid crashing if there is a 160 META-INF/services entry for a class that the compiler has not yet generated. --> 161 <arg>-AallowedMissingSerializableExtensionClasses=.*TestStringSerializerFactory</arg> 162 </compilerArgs> 163 <annotationProcessorPaths> 164 <path> 165 <groupId>com.google.auto.service</groupId> 166 <artifactId>auto-service</artifactId> 167 <version>${auto-service.version}</version> 168 </path> 169 <path> 170 <groupId>net.ltgt.gradle.incap</groupId> 171 <artifactId>incap-processor</artifactId> 172 <version>1.0.0</version> 173 </path> 174 </annotationProcessorPaths> 175 </configuration> 176 <executions> 177 <execution> 178 <id>default-testCompile</id> 179 <configuration> 180 <compilerArgs> 181 <!-- For MemoizeTest. --> 182 <arg>-parameters</arg> 183 </compilerArgs> 184 <annotationProcessorPaths> 185 <path> 186 <groupId>com.google.auto.value</groupId> 187 <artifactId>auto-value</artifactId> 188 <version>${project.version}</version> 189 </path> 190 <path> 191 <groupId>com.google.auto.service</groupId> 192 <artifactId>auto-service</artifactId> 193 <version>${auto-service.version}</version> 194 </path> 195 </annotationProcessorPaths> 196 </configuration> 197 </execution> 198 </executions> 199 </plugin> 200 <plugin> 201 <groupId>org.apache.maven.plugins</groupId> 202 <artifactId>maven-surefire-plugin</artifactId> 203 <version>3.1.2</version> 204 <configuration> 205 <argLine>${test.jvm.flags}</argLine> 206 </configuration> 207 </plugin> 208 <plugin> 209 <groupId>org.apache.maven.plugins</groupId> 210 <artifactId>maven-jar-plugin</artifactId> 211 </plugin> 212 <plugin> 213 <groupId>org.apache.maven.plugins</groupId> 214 <artifactId>maven-invoker-plugin</artifactId> 215 </plugin> 216 <plugin> 217 <groupId>org.apache.maven.plugins</groupId> 218 <artifactId>maven-shade-plugin</artifactId> 219 <version>3.5.0</version> 220 <executions> 221 <execution> 222 <phase>package</phase> 223 <goals> 224 <goal>shade</goal> 225 </goals> 226 <configuration> 227 <minimizeJar>true</minimizeJar> 228 <artifactSet> 229 <excludes> 230 <exclude>com.google.code.findbugs:jsr305</exclude> 231 </excludes> 232 </artifactSet> 233 <filters> 234 <filter> 235 <artifact>*:*</artifact> 236 <excludes> 237 <!-- Don't include kotlinx-metadata.kotlin_module, etc. We're shading those 238 libaries and they're only used from Java. Leaving them in the jar creates 239 "incompatible version" errors from the Kotlin compiler. --> 240 <exclude>META-INF/*.kotlin_module</exclude> 241 </excludes> 242 </filter> 243 </filters> 244 <transformers> 245 <!-- Needed to avoid "No MetadataExtensions instances found in the classpath" from Kotlin reflection. --> 246 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> 247 </transformers> 248 <relocations> 249 <relocation> 250 <pattern>com.google</pattern> 251 <shadedPattern>autovalue.shaded.com.google</shadedPattern> 252 <excludes> 253 <exclude>com.google.auto.value.**</exclude> 254 </excludes> 255 </relocation> 256 <relocation> 257 <pattern>com.squareup.javapoet</pattern> 258 <shadedPattern>autovalue.shaded.com.squareup.javapoet</shadedPattern> 259 </relocation> 260 <relocation> 261 <pattern>kotlin</pattern> 262 <shadedPattern>autovalue.shaded.kotlin</shadedPattern> 263 </relocation> 264 <relocation> 265 <pattern>kotlinx</pattern> 266 <shadedPattern>autovalue.shaded.kotlinx</shadedPattern> 267 </relocation> 268 <relocation> 269 <pattern>net.ltgt.gradle.incap</pattern> 270 <shadedPattern>autovalue.shaded.net.ltgt.gradle.incap</shadedPattern> 271 </relocation> 272 <relocation> 273 <pattern>org.checkerframework</pattern> 274 <shadedPattern>autovalue.shaded.org.checkerframework</shadedPattern> 275 </relocation> 276 <relocation> 277 <pattern>org.jetbrains</pattern> 278 <shadedPattern>autovalue.shaded.org.jetbrains</shadedPattern> 279 </relocation> 280 <relocation> 281 <pattern>org.objectweb</pattern> 282 <shadedPattern>autovalue.shaded.org.objectweb</shadedPattern> 283 </relocation> 284 </relocations> 285 </configuration> 286 </execution> 287 </executions> 288 </plugin> 289 </plugins> 290 </build> 291 <profiles> 292 <profile> 293 <id>disable-java8-doclint</id> 294 <activation> 295 <jdk>[1.8,)</jdk> 296 </activation> 297 <properties> 298 <additionalparam>-Xdoclint:none</additionalparam> 299 </properties> 300 </profile> 301 <profile> 302 <id>open-modules</id> 303 <activation> 304 <jdk>[9,)</jdk> 305 </activation> 306 <properties> 307 <test.jvm.flags>--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED 308 --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED 309 --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</test.jvm.flags> 310 </properties> 311 </profile> 312 <profile> 313 <id>exclude-module-tests</id> 314 <activation> 315 <jdk>(,9)</jdk> 316 </activation> 317 <build> 318 <plugins> 319 <plugin> 320 <artifactId>maven-compiler-plugin</artifactId> 321 <configuration> 322 <testExcludes> 323 <exclude>**/AutoValueModuleCompilationTest.java</exclude> 324 </testExcludes> 325 </configuration> 326 </plugin> 327 </plugins> 328 </build> 329 </profile> 330 </profiles> 331</project> 332