~exprez135/cryptomator-libre

6ccd248675e96dfd6d1a8a8ea869797a51c2afed — Sebastian Stenzel 11 months ago c760e63
use maven profiles to build different buildkits
M .github/workflows/build.yml => .github/workflows/build.yml +6 -3
@@ 7,7 7,6 @@ jobs:
  build:
    name: Build and Test
    runs-on: ubuntu-latest
    #This check is case insensitive
    if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
    steps:
      - uses: actions/checkout@v2


@@ 34,18 33,22 @@ jobs:
          $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar final
        env:
          CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
      - name: Assemble Buildkit
        run: mvn -B package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease
      - name: Assemble buildkit-linux.zip
        run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,linux
      - name: Upload buildkit-linux.zip
        uses: actions/upload-artifact@v1
        with:
          name: buildkit-linux.zip
          path: main/buildkit/target/buildkit-linux.zip
      - name: Assemble buildkit-mac.zip
        run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,mac
      - name: Upload buildkit-mac.zip
        uses: actions/upload-artifact@v1
        with:
          name: buildkit-mac.zip
          path: main/buildkit/target/buildkit-mac.zip
      - name: Assemble buildkit-win.zip
        run: mvn -B clean package -DskipTests --file main/pom.xml --resume-from=buildkit -Prelease,win
      - name: Upload buildkit-win.zip
        uses: actions/upload-artifact@v1
        with:

M main/buildkit/assembly-linux.xml => main/buildkit/assembly-linux.xml +0 -7
@@ 43,12 43,5 @@
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
		<fileSet>
			<directory>target/linux-libs</directory>
			<includes>
				<include>*.jar</include>
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
	</fileSets>
</assembly>
\ No newline at end of file

M main/buildkit/assembly-mac.xml => main/buildkit/assembly-mac.xml +0 -7
@@ 43,12 43,5 @@
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
		<fileSet>
			<directory>target/mac-libs</directory>
			<includes>
				<include>*.jar</include>
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
	</fileSets>
</assembly>
\ No newline at end of file

M main/buildkit/assembly-win.xml => main/buildkit/assembly-win.xml +0 -7
@@ 43,12 43,5 @@
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
		<fileSet>
			<directory>target/win-libs</directory>
			<includes>
				<include>*.jar</include>
			</includes>
			<outputDirectory>libs</outputDirectory>
		</fileSet>
	</fileSets>
</assembly>
\ No newline at end of file

M main/buildkit/pom.xml => main/buildkit/pom.xml +88 -101
@@ 24,7 24,6 @@
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>copy-resources</id>


@@ 55,8 54,8 @@

			<!-- copy libraries to target/libs/: -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.1.1</version>
				<executions>
					<execution>
						<id>copy-libs</id>


@@ 65,110 64,98 @@
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<includeScope>runtime</includeScope>
							<outputDirectory>${project.build.directory}/libs</outputDirectory>
							<excludeClassifiers>linux,mac,win</excludeClassifiers>
							<excludeArtifactIds>dbus-java,secret-service,kdewallet,hkdf,java-utils</excludeArtifactIds>
						</configuration>
					</execution>
					<execution>
						<id>copy-linux-libs</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/linux-libs</outputDirectory>
							<includeGroupIds>org.openjfx</includeGroupIds>
							<classifier>linux</classifier>
						</configuration>
					</execution>
					<execution>
						<id>copy-linux-system-keychain-access</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/linux-libs</outputDirectory>
							<includeArtifactIds>dbus-java,secret-service,kdewallet,hkdf,java-utils</includeArtifactIds>
						</configuration>
					</execution>
					<execution>
						<id>copy-mac-libs</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/mac-libs</outputDirectory>
							<includeGroupIds>org.openjfx</includeGroupIds>
							<classifier>mac</classifier>
						</configuration>
					</execution>
					<execution>
						<id>copy-win-libs</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/win-libs</outputDirectory>
							<includeGroupIds>org.openjfx</includeGroupIds>
							<classifier>win</classifier>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- create buildkit.zip: -->
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.1.1</version>
				<executions>
					<execution>
						<id>assemble-linux</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>assembly-linux.xml</descriptor>
							</descriptors>
							<appendAssemblyId>false</appendAssemblyId>
							<finalName>buildkit-linux</finalName>
						</configuration>
					</execution>
					<execution>
						<id>assemble-mac</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>assembly-mac.xml</descriptor>
							</descriptors>
							<appendAssemblyId>false</appendAssemblyId>
							<finalName>buildkit-mac</finalName>
						</configuration>
					</execution>
					<execution>
						<id>assemble-win</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>assembly-win.xml</descriptor>
							</descriptors>
							<appendAssemblyId>false</appendAssemblyId>
							<finalName>buildkit-win</finalName>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>linux</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>assemble-linux</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>assembly-linux.xml</descriptor>
									</descriptors>
									<appendAssemblyId>false</appendAssemblyId>
									<finalName>buildkit-linux</finalName>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>mac</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>assemble-mac</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>assembly-mac.xml</descriptor>
									</descriptors>
									<appendAssemblyId>false</appendAssemblyId>
									<finalName>buildkit-mac</finalName>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>win</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>assemble-win</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>assembly-win.xml</descriptor>
									</descriptors>
									<appendAssemblyId>false</appendAssemblyId>
									<finalName>buildkit-win</finalName>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
\ No newline at end of file

M main/pom.xml => main/pom.xml +30 -14
@@ 291,6 291,9 @@
				<os>
					<family>mac</family>
				</os>
				<property>
					<name>idea.version</name>
				</property>
			</activation>
			<dependencies>
				<dependency>


@@ 306,6 309,9 @@
					<family>unix</family>
					<name>Linux</name>
				</os>
				<property>
					<name>idea.version</name>
				</property>
			</activation>
			<dependencies>
				<dependency>


@@ 320,6 326,9 @@
				<os>
					<family>windows</family>
				</os>
				<property>
					<name>idea.version</name>
				</property>
			</activation>
			<dependencies>
				<dependency>


@@ 334,20 343,29 @@
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.1.2</version>
					<executions>
						<execution>
							<id>copy-libs</id>
							<goals>
								<goal>copy-dependencies</goal>
							</goals>
							<configuration>
								<outputDirectory>${project.build.directory}/libs</outputDirectory>
								<includeScope>runtime</includeScope>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>3.3.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.22.2</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>


@@ 397,7 415,6 @@
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<release>14</release>
					<annotationProcessorPaths>


@@ 412,7 429,6 @@
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
			</plugin>
		</plugins>
	</build>