Separate package by version
This commit is contained in:
parent
2af1195612
commit
57a7929da5
@ -12,7 +12,7 @@ source ./setup-variables.sh
|
||||
|
||||
cd ../../generated
|
||||
|
||||
mvn -B -Drevision=${REVISION} clean deploy
|
||||
mvn -B -DrevisionNumber="${REVISION}" -DrevisionSuffix="" clean deploy
|
||||
|
||||
echo "Done."
|
||||
exit 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
package it.tdlight.jni.implementation_name.operating_system_name.cpu_architecture_name;
|
||||
package it.tdlight.jni.implementation_name.operating_system_name.cpu_architecture_name.version;
|
||||
|
||||
import java.lang.ClassLoader;
|
||||
import java.io.InputStream;
|
||||
@ -6,7 +6,8 @@ import java.io.File;
|
||||
|
||||
public class LoadLibrary {
|
||||
public static InputStream getLibraryAsStream() {
|
||||
return LoadLibrary.class.getResourceAsStream("/libs/" + getOsName() + "/" + getArchName() + "/" + getFileName() + getExtension());
|
||||
return LoadLibrary.class.getResourceAsStream("/libs/" + getOsName() + "/" + getArchName() + "/"
|
||||
+ getFileName() + "/" + getVersionName() + getExtension());
|
||||
}
|
||||
|
||||
private static String getOsName() {
|
||||
@ -17,6 +18,10 @@ public class LoadLibrary {
|
||||
return LoadLibrary.class.getPackage().getName().split("\\.")[5];
|
||||
}
|
||||
|
||||
private static String getVersionName() {
|
||||
return LoadLibrary.class.getPackage().getName().split("\\.")[6];
|
||||
}
|
||||
|
||||
private static String getFileName() {
|
||||
return "tdjni";
|
||||
}
|
@ -2,12 +2,14 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>it.tdlight</groupId>
|
||||
<artifactId>${IMPLEMENTATION_NAME}-natives-${OPERATING_SYSTEM_NAME}-${CPU_ARCHITECTURE_NAME}</artifactId>
|
||||
<version>3.3.${revision}</version>
|
||||
<!-- Don't change the version! (or change it also in <shadedPattern>) -->
|
||||
<version>4.0.${revisionNumber}${revisionSuffix}</version>
|
||||
<name>${IMPLEMENTATION_NAME} natives for ${OPERATING_SYSTEM_NAME} (${CPU_ARCHITECTURE_NAME})</name>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<revision>0-SNAPSHOT</revision>
|
||||
<revisionNumber>0</revisionNumber>
|
||||
<revisionSuffix>-SNAPSHOT</revisionSuffix>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@ -42,8 +44,8 @@
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<source>8</source>
|
||||
<target>8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@ -96,8 +98,8 @@
|
||||
<configuration>
|
||||
<relocations>
|
||||
<relocation>
|
||||
<pattern>it.tdlight.jni.implementation_name.operating_system_name.cpu_architecture_name</pattern>
|
||||
<shadedPattern>it.tdlight.jni.${IMPLEMENTATION_NAME}.${OPERATING_SYSTEM_NAME_SHORT}.${CPU_ARCHITECTURE_NAME}</shadedPattern>
|
||||
<pattern>it.tdlight.jni.implementation_name.operating_system_name.cpu_architecture_name.version</pattern>
|
||||
<shadedPattern>it.tdlight.jni.${IMPLEMENTATION_NAME}.${OPERATING_SYSTEM_NAME_SHORT}.${CPU_ARCHITECTURE_NAME}.v_4_0_${revisionNumber}</shadedPattern>
|
||||
</relocation>
|
||||
</relocations>
|
||||
</configuration>
|
||||
|
@ -2,12 +2,13 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>it.tdlight</groupId>
|
||||
<artifactId>${IMPLEMENTATION_NAME}-api</artifactId>
|
||||
<version>3.3.${revision}</version>
|
||||
<version>4.0.${revisionNumber}${revisionSuffix}</version>
|
||||
<name>${IMPLEMENTATION_NAME} API</name>
|
||||
<packaging>jar</packaging>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<revision>0-SNAPSHOT</revision>
|
||||
<revisionNumber>0</revisionNumber>
|
||||
<revisionSuffix>-SNAPSHOT</revisionSuffix>
|
||||
</properties>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
@ -55,7 +56,7 @@
|
||||
<configuration>
|
||||
<additionalOptions>-html5</additionalOptions>
|
||||
<additionalOptions>-public</additionalOptions>
|
||||
<release>13</release>
|
||||
<release>17</release>
|
||||
<quiet>true</quiet>
|
||||
<notimestamp>true</notimestamp>
|
||||
</configuration>
|
||||
|
Loading…
Reference in New Issue
Block a user