Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(gradle): update to gradle 7 #404

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions gradle/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import sc.gradle.ScriptsTask
import java.util.concurrent.atomic.AtomicBoolean

plugins {
maven
kotlin("jvm") version "1.4.30"
id("org.jetbrains.dokka") version "0.10.1"
id("scripts-task")
`maven-publish`

id("com.github.ben-manes.versions") version "0.38.0"
id("se.patrikerdes.use-latest-versions") version "0.2.15"
Expand Down Expand Up @@ -261,8 +261,21 @@ allprojects {
}

if (this.name in documentedProjects) {
apply(plugin = "maven")
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.dokka")
publishing {
publications {
create<MavenPublication>(name) {
println(components.joinToString())
from(components["java"])
version = rootProject.version.toString()
}
}
}
java {
withSourcesJar()
withJavadocJar()
}
tasks {
val doc by creating(DokkaTask::class) {
group = "documentation"
Expand All @@ -277,17 +290,14 @@ allprojects {
archiveClassifier.set("javadoc")
from(doc.outputDirectory)
}
val sourcesJar by creating(Jar::class) {
group = "build"
archiveBaseName.set(jar.get().archiveBaseName)
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
install {
dependsOn(docJar, sourcesJar)
}
//val sourcesJar by creating(Jar::class) {
// group = "build"
// archiveBaseName.set(jar.get().archiveBaseName)
// archiveClassifier.set("sources")
// from(sourceSets.main.get().allSource)
//}
artifacts {
archives(sourcesJar.archiveFile) { classifier = "sources" }
//archives(sourcesJar.archiveFile) { classifier = "sources" }
archives(docJar.archiveFile) { classifier = "javadoc" }
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists