Tag: uberjar

在MANIFEST.MF中将Kotlin类指定为Main-Class入口点?

我如何明确告诉shadowJar使用Kotlin文件作为生成的uberJar的入口点? (或者,你喜欢胖胖的JAR 。) 笨拙地编辑META-INF/MANIFEST.MF并将其替换为zip文件(使用GUI将其放回): thufir@dur:~/NetBeansProjects/kotlin/build/libs$ thufir@dur:~/NetBeansProjects/kotlin/build/libs$ ll total 900 drwxrwxr-x 2 thufir thufir 4096 Nov 5 03:42 ./ drwxrwxr-x 8 thufir thufir 4096 Nov 5 03:42 ../ -rw-rw-r– 1 thufir thufir 903184 Nov 5 03:42 kotlinAdder.jar thufir@dur:~/NetBeansProjects/kotlin/build/libs$ thufir@dur:~/NetBeansProjects/kotlin/build/libs$ jar xf kotlinAdder.jar thufir@dur:~/NetBeansProjects/kotlin/build/libs$ thufir@dur:~/NetBeansProjects/kotlin/build/libs$ ll total 928 drwxrwxr-x 7 thufir thufir 4096 Nov 5 03:42 ./ […]

Kotlin脚本Gradle:build.gradle.kts和ShadowJar

清理生成并运行: thufir@dur:~/NetBeansProjects/kotlinShadowJar$ thufir@dur:~/NetBeansProjects/kotlinShadowJar$ gradle clean ShadowJar;java -jar build/libs/Hiya.jar > Task :compileKotlin Using Kotlin incremental compilation > Task :shadowJar A problem was found with the configuration of task ‘:shadowJar’. Registering invalid inputs and outputs via TaskInputs and TaskOutputs methods has been deprecated and is scheduled to be removed in Gradle 5.0. – No value has been […]

找不到Kotlin脚本Gradle的kotlin-gradle-plugin

构建失败,类路径错误: thufir@dur:~/NetBeansProjects/kotlinShadowJar$ thufir@dur:~/NetBeansProjects/kotlinShadowJar$ gradle clean FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project ‘kotlinShadowJar’. > Could not resolve all files for configuration ‘:classpath’. > Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:. Searched in the following locations: file:/home/thufir/.gradle/caches/4.3.1/embedded-kotlin-repo-1.1.51-1/repo/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.pom file:/home/thufir/.gradle/caches/4.3.1/embedded-kotlin-repo-1.1.51-1/repo/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.jar https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.pom https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.jar https://repo.gradle.org/gradle/repo/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.pom https://repo.gradle.org/gradle/repo/org/jetbrains/kotlin/kotlin-gradle-plugin//kotlin-gradle-plugin-.jar Required by: project : * Try: Run with […]