Skip to content

Commit

Permalink
fix jitpack upload
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiaoliang04 authored and lixiaoliang04 committed Sep 21, 2023
1 parent d6a7a21 commit c5c1cf0
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions file-plugin/src/main/kotlin/com/imf/plugin/so/Plugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ abstract class SoFilePlugin : Plugin<Project> {
}
//endregion

val dep = project.dependencies.add(
p7zConfig.name, mapOf<String, String>(
"group" to "com.mainlxl.tools",
"name" to "p7z",
"classifier" to osdetector.classifier,
"version" to "1.0.1",
"ext" to "exe"
)
)
runCatching {
val file = p7zConfig.fileCollection(dep).singleFile
if (!file.canExecute() && !file.setExecutable(true)) {
throw GradleException("Cannot set ${file} as executable")
}
return file.absolutePath
}
// val dep = project.dependencies.add(
// p7zConfig.name, mapOf<String, String>(
// "group" to "com.mainlxl.tools",
// "name" to "p7z",
// "classifier" to osdetector.classifier,
// "version" to "1.0.1",
// "ext" to "exe"
// )
// )
// runCatching {
// val file = p7zConfig.fileCollection(dep).singleFile
// if (!file.canExecute() && !file.setExecutable(true)) {
// throw GradleException("Cannot set ${file} as executable")
// }
// return file.absolutePath
// }
// 兜底使用系统环境变量配置的7z命令
val os = System.getenv("OS")?.lowercase()
if (os != null && os.contains("windows")) {
Expand Down

0 comments on commit c5c1cf0

Please sign in to comment.