@@ -49,6 +49,15 @@ val compileNative = if (deployNative) {
49
49
}
50
50
} else null
51
51
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
+
52
61
val nativesJar = if (deployNative) {
53
62
tasks.register<Jar >(" nativesJar" ) {
54
63
// Required for configuration cache
@@ -63,10 +72,7 @@ val nativesJar = if (deployNative) {
63
72
}
64
73
into(" natives/$platform /" )
65
74
}
66
- from(layout.projectDirectory.files(" LICENSE.*" , " COPYING.*" , " COPYRIGHT.*" , " Copyright.*" ))
67
- from(rootProject.layout.projectDirectory.file(" LICENSE" )) {
68
- rename { " LICENSE.ffmpeg-static" }
69
- }
75
+ licenses()
70
76
}
71
77
} else null
72
78
@@ -78,12 +84,7 @@ val zipBuild = if (deployNative) {
78
84
include(" lib/**/*" )
79
85
include(" share/**/*" )
80
86
}
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()
87
88
}
88
89
} else null
89
90
0 commit comments