Я использую gradle для упаковки своего проекта, теперь я хочу упаковать app.properties file
в папку meta-inf
, что мне нужно сделать, чтобы сделать это? это мой файл build.gradle:
project(":rdw-flinkjob-consume") {
apply plugin: 'com.github.johnrengelman.shadow'
archivesBaseName = "rdw-flinkjob-consume"
version = "1.0.0-SNAPSHOT"
group = 'com.sportswin.rdw'
mainClassName = 'com.sportswin.rdw.WalletConsumeRealtimeHandler'
description = """Flink Quickstart Job"""
// NOTE: We cannot use "compileOnly" or "shadow" configurations since then we could not run code
// in the IDE or with "gradle run". We also cannot exclude transitive dependencies from the
// shadowJar yet (see https://github.com/johnrengelman/shadow/issues/159).
// -> Explicitly define the // libraries we want to be included in the "flinkShadowJar" configuration!
configurations {
flinkShadowJar // dependencies which go into the shadowJar
// always exclude these (also from transitive dependencies) since they are provided by Flink
// flinkShadowJar.exclude group: 'org.apache.flink', module: 'force-shading'
flinkShadowJar.exclude group: 'com.google.code.findbugs', module: 'jsr305'
}
applicationDefaultJvmArgs = ["-Dapp.id=0010020015","-XX:MaxMetaspaceSize=128m"]
dependencies {
flinkShadowJar project(":rdw-flinkjob-common")
}
// make compileOnly dependencies available for tests:
sourceSets {
main.compileClasspath += configurations.flinkShadowJar
main.runtimeClasspath += configurations.flinkShadowJar
test.compileClasspath += configurations.flinkShadowJar
test.runtimeClasspath += configurations.flinkShadowJar
javadoc.classpath += configurations.flinkShadowJar
}
run.classpath = sourceSets.main.runtimeClasspath
jar {
manifest {
attributes 'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
}
}
shadowJar {
configurations = [project.configurations.flinkShadowJar]
}
}
это структура моей папки проекта:
![enter image description here](https://i.stack.imgur.com/R6ivq.png)
Я проверяю папку пакета структура, это выглядит так:
![enter image description here](https://i.stack.imgur.com/MkBxT.png)