@@ -49,6 +49,15 @@ val compileNative = if (deployNative) {
4949 }
5050} else null
5151
52+ fun AbstractCopyTask.licenses () {
53+ from(layout.projectDirectory.files(" LICENSE.*" , " COPYING.*" , " COPYRIGHT.*" , " Copyright.*" )) {
54+ rename { " ffmpeg-static-$it " }
55+ }
56+ from(rootProject.layout.projectDirectory.files(" LICENSE" , " THIRDPARTY_LICENSES" )) {
57+ rename { " ffmpeg-static-$it " }
58+ }
59+ }
60+
5261val nativesJar = if (deployNative) {
5362 tasks.register<Jar >(" nativesJar" ) {
5463 // Required for configuration cache
@@ -63,10 +72,7 @@ val nativesJar = if (deployNative) {
6372 }
6473 into(" natives/$platform /" )
6574 }
66- from(layout.projectDirectory.files(" LICENSE.*" , " COPYING.*" , " COPYRIGHT.*" , " Copyright.*" ))
67- from(rootProject.layout.projectDirectory.file(" LICENSE" )) {
68- rename { " LICENSE.ffmpeg-static" }
69- }
75+ licenses()
7076 }
7177} else null
7278
@@ -78,12 +84,7 @@ val zipBuild = if (deployNative) {
7884 include(" lib/**/*" )
7985 include(" share/**/*" )
8086 }
81- from(layout.projectDirectory.files(" LICENSE.*" , " COPYING.*" , " COPYRIGHT.*" , " Copyright.*" )) {
82- rename { " ffmpeg-static-$name " }
83- }
84- from(rootProject.layout.projectDirectory.files(" LICENSE" , " THIRDPARTY_LICENSES" )) {
85- rename { " ffmpeg-static-$name " }
86- }
87+ licenses()
8788 }
8889} else null
8990
0 commit comments