Skip to content

Commit

Permalink
Nest example project in multi-project build
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 6, 2024
1 parent 7f2fb55 commit 5222477
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
23 changes: 3 additions & 20 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
plugins {
id("org.metaborg.convention.java")
id("org.metaborg.convention.maven-publish")
id("org.metaborg.convention.root-project")
}

group = "org.metaborg"
description = "A Metaborg Gradle convention plugin example project."

javaConvention {
javaVersion.set(JavaLanguageVersion.of(17))
}

mavenPublishConvention {
repoOwner.set("metaborg")
repoName.set("convention-plugin-example")
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
rootProjectConvention {
taskNameSuffix.set("All")
}
25 changes: 25 additions & 0 deletions example/java-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
plugins {
`java-library`
id("org.metaborg.convention.java")
id("org.metaborg.convention.maven-publish")
}

group = "org.metaborg"
description = "A Metaborg Gradle convention plugin example project."

javaConvention {
javaVersion.set(JavaLanguageVersion.of(17))
}

mavenPublishConvention {
repoOwner.set("metaborg")
repoName.set("convention-plugin-example")
}

publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
7 changes: 7 additions & 0 deletions example/java-example/src/main/java/test/Hello.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package test;

public class Hello {
static void main(String[] args) {
System.out.println("Hello, World!");
}
}

0 comments on commit 5222477

Please sign in to comment.