• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<project xmlns="http://maven.apache.org/POM/4.0.0"
3         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4    <modelVersion>4.0.0</modelVersion>
5
6    <artifactId>ktfmt</artifactId>
7
8    <name>Ktfmt</name>
9    <description>A program that reformats Kotlin source code to comply with the common community standard for Kotlin code conventions.</description>
10
11    <parent>
12        <groupId>com.facebook</groupId>
13        <artifactId>ktfmt-parent</artifactId>
14        <version>0.43</version>
15    </parent>
16
17    <properties>
18        <dokka.version>0.10.1</dokka.version>
19        <kotlin.version>1.6.10</kotlin.version>
20        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
21        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
22        <main.class>com.facebook.ktfmt.cli.Main</main.class>
23    </properties>
24
25    <pluginRepositories>
26        <pluginRepository>
27            <id>jcenter</id>
28            <name>JCenter</name>
29            <url>https://jcenter.bintray.com/</url>
30        </pluginRepository>
31    </pluginRepositories>
32
33    <build>
34        <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
35        <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
36        <plugins>
37            <plugin>
38                <groupId>org.jetbrains.kotlin</groupId>
39                <artifactId>kotlin-maven-plugin</artifactId>
40                <version>${kotlin.version}</version>
41
42                <executions>
43                    <execution>
44                        <id>compile</id>
45                        <goals>
46                            <goal>compile</goal>
47                        </goals>
48                        <configuration>
49                            <sourceDirs>
50                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
51                            </sourceDirs>
52                        </configuration>
53                    </execution>
54
55                    <execution>
56                        <id>test-compile</id>
57                        <goals>
58                            <goal>test-compile</goal>
59                        </goals>
60                        <configuration>
61                            <sourceDirs>
62                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
63                            </sourceDirs>
64                        </configuration>
65                    </execution>
66                </executions>
67            </plugin>
68            <plugin>
69                <groupId>org.apache.maven.plugins</groupId>
70                <artifactId>maven-compiler-plugin</artifactId>
71                <version>3.5.1</version>
72                <configuration>
73                    <source>1.8</source>
74                    <target>1.8</target>
75                </configuration>
76                <executions>
77                    <!-- Replacing default-compile as it is treated specially by maven -->
78                    <execution>
79                        <id>default-compile</id>
80                        <phase>none</phase>
81                    </execution>
82                    <!-- Replacing default-testCompile as it is treated specially by maven -->
83                    <execution>
84                        <id>default-testCompile</id>
85                        <phase>none</phase>
86                    </execution>
87                    <execution>
88                        <id>java-compile</id>
89                        <phase>compile</phase>
90                        <goals>
91                            <goal>compile</goal>
92                        </goals>
93                    </execution>
94                    <execution>
95                        <id>java-test-compile</id>
96                        <phase>test-compile</phase>
97                        <goals>
98                            <goal>testCompile</goal>
99                        </goals>
100                    </execution>
101                </executions>
102            </plugin>
103            <plugin>
104                <groupId>org.apache.maven.plugins</groupId>
105                <artifactId>maven-jar-plugin</artifactId>
106                <version>3.3.0</version>
107                <configuration>
108                    <archive>
109                        <manifest>
110                            <addClasspath>true</addClasspath>
111                            <mainClass>${main.class}</mainClass>
112                        </manifest>
113                    </archive>
114                </configuration>
115            </plugin>
116            <plugin>
117                <groupId>org.apache.maven.plugins</groupId>
118                <artifactId>maven-assembly-plugin</artifactId>
119                <version>3.3.0</version>
120                <executions>
121                    <execution>
122                        <id>make-assembly</id>
123                        <phase>package</phase>
124                        <goals>
125                            <goal>single</goal>
126                        </goals>
127                        <configuration>
128                            <archive>
129                                <manifest>
130                                    <mainClass>${main.class}</mainClass>
131                                </manifest>
132                            </archive>
133                            <descriptorRefs>
134                                <descriptorRef>jar-with-dependencies</descriptorRef>
135                            </descriptorRefs>
136                        </configuration>
137                    </execution>
138                </executions>
139            </plugin>
140        </plugins>
141    </build>
142
143    <dependencies>
144        <dependency>
145            <groupId>com.google.guava</groupId>
146            <artifactId>guava</artifactId>
147            <version>29.0-jre</version>
148        </dependency>
149        <dependency>
150            <groupId>org.jetbrains.kotlin</groupId>
151            <artifactId>kotlin-stdlib-jdk7</artifactId>
152            <version>${kotlin.version}</version>
153        </dependency>
154        <dependency>
155            <groupId>org.jetbrains.kotlin</groupId>
156            <artifactId>kotlin-test</artifactId>
157            <version>${kotlin.version}</version>
158        </dependency>
159        <dependency>
160            <groupId>org.jetbrains.kotlin</groupId>
161            <artifactId>kotlin-compiler-embeddable</artifactId>
162            <version>${kotlin.version}</version>
163        </dependency>
164        <!-- https://mvnrepository.com/artifact/net.java.dev.jna/jna -->
165        <dependency>
166            <groupId>net.java.dev.jna</groupId>
167            <artifactId>jna</artifactId>
168            <version>4.2.2</version>
169        </dependency>
170        <dependency>
171            <groupId>com.google.googlejavaformat</groupId>
172            <artifactId>google-java-format</artifactId>
173            <version>1.8</version>
174        </dependency>
175        <dependency>
176            <groupId>junit</groupId>
177            <artifactId>junit</artifactId>
178            <version>4.13.1</version>
179            <scope>test</scope>
180        </dependency>
181        <dependency>
182            <groupId>com.google.truth</groupId>
183            <artifactId>truth</artifactId>
184            <version>1.0</version>
185            <scope>test</scope>
186        </dependency>
187    </dependencies>
188
189    <profiles>
190        <profile>
191            <id>release</id>
192            <build>
193                <plugins>
194                    <plugin>
195                        <groupId>org.sonatype.plugins</groupId>
196                        <artifactId>nexus-staging-maven-plugin</artifactId>
197                        <version>1.6.7</version>
198                        <extensions>true</extensions>
199                        <configuration>
200                            <serverId>ossrh</serverId>
201                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
202                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
203                        </configuration>
204                    </plugin>
205
206                    <!-- Source JAR -->
207                    <plugin>
208                        <groupId>org.apache.maven.plugins</groupId>
209                        <artifactId>maven-source-plugin</artifactId>
210                        <version>2.2.1</version>
211                        <executions>
212                            <execution>
213                                <id>attach-sources</id>
214                                <goals>
215                                    <goal>jar-no-fork</goal>
216                                </goals>
217                            </execution>
218                        </executions>
219                    </plugin>
220
221                    <!-- Javadoc JAR -->
222                    <!-- Dokka, Kotlin's javadoc, doesn't work on JDK 10+, so we're creating an empty javadoc jar instead. -->
223                    <!-- (https://github.com/Kotlin/dokka/issues/294) -->
224                    <plugin>
225                        <groupId>org.apache.maven.plugins</groupId>
226                        <artifactId>maven-jar-plugin</artifactId>
227                        <executions>
228                            <execution>
229                                <phase>package</phase>
230                                <goals>
231                                    <goal>jar</goal>
232                                </goals>
233                                <configuration>
234                                    <classifier>javadoc</classifier>
235                                    <classesDirectory>${project.basedir}/non/existing/dir</classesDirectory>
236                                </configuration>
237                            </execution>
238                        </executions>
239                    </plugin>
240
241                    <!-- Sign artifacts -->
242                    <plugin>
243                        <groupId>org.apache.maven.plugins</groupId>
244                        <artifactId>maven-gpg-plugin</artifactId>
245                        <version>1.6</version>
246                        <executions>
247                            <execution>
248                                <id>sign-artifacts</id>
249                                <phase>verify</phase>
250                                <goals>
251                                    <goal>sign</goal>
252                                </goals>
253                                <configuration>
254                                    <!-- Honor -Dgpg.passphrase=... on the command line. -->
255                                    <gpgArguments>
256                                        <arg>--pinentry-mode</arg>
257                                        <arg>loopback</arg>
258                                    </gpgArguments>
259                                </configuration>
260                            </execution>
261                        </executions>
262                    </plugin>
263                </plugins>
264            </build>
265        </profile>
266    </profiles>
267
268    <distributionManagement>
269        <snapshotRepository>
270            <id>ossrh</id>
271            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
272        </snapshotRepository>
273    </distributionManagement>
274
275</project>
276