Add pom.xml and custom replacements
This commit is contained in:
parent
902f1c80a1
commit
eeec132f99
99
pom.template.xml
Normal file
99
pom.template.xml
Normal file
@ -0,0 +1,99 @@
|
||||
<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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>it.tdlight</groupId>
|
||||
<artifactId>tdlight-natives-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}</artifactId>
|
||||
<version>3.0.0-${IMPLEMENTATION_NAME}-SNAPSHOT</version>
|
||||
<name>TDLight Natives for Windows (amd64)</name>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>mchv-release-distribution</id>
|
||||
<name>MCHV Release Apache Maven Packages Distribution</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>mchv-snapshot-distribution</id>
|
||||
<name>MCHV Snapshot Apache Maven Packages Distribution</name>
|
||||
<url>https://mvn.mchv.eu/repository/mchv-snapshot</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
<scm>
|
||||
<url>https://git.ignuranza.net/tdlight-team/tdlight-java-natives.git</url>
|
||||
<connection>scm:git:https://git.ignuranza.net/tdlight-team/tdlight-java-natives.git</connection>
|
||||
<developerConnection>scm:git:https://git.ignuranza.net/tdlight-team/tdlight-java-natives.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>default</id>
|
||||
<goals>
|
||||
<goal>perform</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<pomFileName>${project.name}/pom.xml</pomFileName>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.0.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>it.tdlight.jni.operating_system_name.cpu_architecture_name.implementation_name</pattern>
|
||||
<shadedPattern>it.tdlight.jni.${OPERATING_SYSTEM_NAME}.${CPU_ARCHITECTURE_NAME}.${IMPLEMENTATION_NAME}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,9 @@
|
||||
package it.tdlight.jni.operating_system_name.cpu_architecture_name.implementation_name;
|
||||
|
||||
import java.lang.ClassLoader;
|
||||
|
||||
public class LoadLibrary {
|
||||
public static ClassLoader getClassLoader() {
|
||||
return LoadLibrary.class.getClassLoader();
|
||||
}
|
||||
}
|
3
src/main/replacements/replace-linux-aarch64-tdlib.sed
Normal file
3
src/main/replacements/replace-linux-aarch64-tdlib.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||
s/${CPU_ARCHITECTURE_NAME}/aarch64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlib/
|
3
src/main/replacements/replace-linux-aarch64-tdlight.sed
Normal file
3
src/main/replacements/replace-linux-aarch64-tdlight.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||
s/${CPU_ARCHITECTURE_NAME}/aarch64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlight/
|
3
src/main/replacements/replace-linux-amd64-tdlib.sed
Normal file
3
src/main/replacements/replace-linux-amd64-tdlib.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlib/
|
3
src/main/replacements/replace-linux-amd64-tdlight.sed
Normal file
3
src/main/replacements/replace-linux-amd64-tdlight.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/linux/
|
||||
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlight/
|
3
src/main/replacements/replace-windows-amd64-tdlib.sed
Normal file
3
src/main/replacements/replace-windows-amd64-tdlib.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/windows/
|
||||
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlib/
|
3
src/main/replacements/replace-windows-amd64-tdlight.sed
Normal file
3
src/main/replacements/replace-windows-amd64-tdlight.sed
Normal file
@ -0,0 +1,3 @@
|
||||
s/${OPERATING_SYSTEM_NAME}/windows/
|
||||
s/${CPU_ARCHITECTURE_NAME}/amd64/
|
||||
s/${IMPLEMENTATION_NAME}/tdlight/
|
Loading…
Reference in New Issue
Block a user