Skip to content

Commit

Permalink
Java library plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Dec 4, 2023
1 parent 6133378 commit 156881b
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bespin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library")
}
3 changes: 3 additions & 0 deletions corellia/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library-with-test-fixtures")
}
3 changes: 3 additions & 0 deletions coruscant/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library-published")
}
6 changes: 6 additions & 0 deletions gradle/plugins/java-library-plugins/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
plugins {
`kotlin-dsl`
}

dependencies {
implementation(platform(project(":plugins-platform")))

implementation(project(":java-base-plugins"))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
plugins {
id("maven-publish")
id("org.example.java-library")
}

// Publish with sources and Javadoc
java {
withSourcesJar()
withJavadocJar()
}

// Configure details of Javadoc generation
tasks.javadoc {
(options as StandardJavadocDocletOptions).apply {
memberLevel = JavadocMemberLevel.PUBLIC
isAuthor = true
}
}

publishing.publications.create<MavenPublication>("mavenJava") {
from(components["java"])

// We use consistent resolution + a platform for controlling versions
// -> Publish the versions that are the result of the consistent resolution
versionMapping {
allVariants {
fromResolutionResult()
}
}
}

// The repository to publish to
publishing.repositories {
maven("/tmp/my-repo")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id("org.example.java-library")
id("java-test-fixtures")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
plugins {
id("java-library")
id("org.example.java")
}
3 changes: 3 additions & 0 deletions kamino/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library-published")
}
3 changes: 3 additions & 0 deletions kashyyyk/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library")
}
3 changes: 3 additions & 0 deletions naboo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library")
}
3 changes: 3 additions & 0 deletions tatooine/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id("org.example.java-library")
}

0 comments on commit 156881b

Please sign in to comment.