Skip to content

Commit

Permalink
fix: only release generator executable; resolve child POMs
Browse files Browse the repository at this point in the history
  • Loading branch information
worstell committed Nov 25, 2023
1 parent f3fb34d commit 1421465
Show file tree
Hide file tree
Showing 4 changed files with 260 additions and 81 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ jobs:
- name: Publish JARs # Snapshots are published first, then the tagged release
run: |
mvn -U --batch-mode clean deploy -P release
mvn --batch-mode versions:set -DnewVersion=$(git describe --tags --abbrev=0 | cut -c2-) -DprocessAllModules -DgenerateBackupPoms=false
mvn -U --batch-mode clean deploy -P release
# mvn -Drevision=$(git describe --tags --abbrev=0 | cut -c2-) -U --batch-mode clean deploy -P release
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
Expand Down
105 changes: 92 additions & 13 deletions kotlin-runtime/ftl-generator/pom.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
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">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>ftl-generator</artifactId>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>

<properties>
<rootDir>${basedir}/../..</rootDir>
<maven.deploy.skip>false</maven.deploy.skip>
Expand All @@ -28,35 +30,80 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>ftl-runtime</artifactId>
<version>${project.parent.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.github.ajalt.clikt</groupId>
<artifactId>clikt-jvm</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>org.hotswapagent</groupId>
<artifactId>hotswap-agent-core</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
<goal>shade</goal>
</goals>
<configuration>
<archive>
<manifest>
<shadedArtifactAttached>false</shadedArtifactAttached>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>xyz.block.ftl.generator.MainKt</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</transformer>
</transformers>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -89,4 +136,36 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade-jar</id>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<executions>
<execution>
<id>flatten</id>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
49 changes: 48 additions & 1 deletion kotlin-runtime/ftl-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@
<parent>
<groupId>xyz.block</groupId>
<artifactId>ftl</artifactId>
<version>1.0-SNAPSHOT</version>
<version>${revision}</version>
<relativePath>../../pom.xml</relativePath>
</parent>

<artifactId>ftl-runtime</artifactId>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>

<properties>
<rootDir>${basedir}/../..</rootDir>
<maven.deploy.skip>false</maven.deploy.skip>
Expand Down Expand Up @@ -53,6 +55,51 @@
<version>2.10.1</version>
</dependency>

<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-runtime-jvm</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-server</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.wire</groupId>
<artifactId>wire-grpc-client-jvm</artifactId>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
</dependency>
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-netty</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>org.hotswapagent</groupId>
<artifactId>hotswap-agent-core</artifactId>
</dependency>

<!-- Test dependencies -->
<dependency>
<groupId>io.gitlab.arturbosch.detekt</groupId>
Expand Down
Loading

0 comments on commit 1421465

Please sign in to comment.