Compare commits

..

No commits in common. "0dca2fd27a5621143fd4d1e666fc5381b9fd66d4" and "fec401be5d91c8507576cdc0f0cff4af0892b34a" have entirely different histories.

3 changed files with 15 additions and 17 deletions

View file

@ -5,12 +5,9 @@
* For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.4/userguide/building_java_projects.html in the Gradle documentation. * For more details on building Java & JVM projects, please refer to https://docs.gradle.org/8.4/userguide/building_java_projects.html in the Gradle documentation.
*/ */
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins { plugins {
// Apply the application plugin to add support for building a CLI application in Java. // Apply the application plugin to add support for building a CLI application in Java.
application application
id("com.github.johnrengelman.shadow") version "8.1.1"
} }
repositories { repositories {
@ -44,16 +41,3 @@ tasks.named<Test>("test") {
// Use JUnit Platform for unit tests. // Use JUnit Platform for unit tests.
useJUnitPlatform() useJUnitPlatform()
} }
tasks.withType<ShadowJar> {
archiveBaseName.set("xl")
archiveVersion.set("")
manifest {
attributes(mapOf("Main-Class" to "com.github.csolem.gradle.shadow.kotlin.example.App"))
}
}
// Set build to depend on shadowJar
tasks.named("build") {
dependsOn("shadowJar")
}

View file

@ -0,0 +1,14 @@
/*
* This Java source file was generated by the Gradle 'init' task.
*/
package xl;
public class App {
public String getGreeting() {
return "Hello World!";
}
public static void main(String[] args) {
System.out.println(new App().getGreeting());
}
}

View file

@ -10,7 +10,7 @@ watch:
build: build:
./gradlew build ./gradlew build
ls -lh app/build/libs/*.jar #./gradlew shadowJar
clean: clean:
./gradlew clean ./gradlew clean