Skip to content

Commit

Permalink
Bump Dependencies to Latest Versions
Browse files Browse the repository at this point in the history
  • Loading branch information
teogor committed Apr 16, 2024
1 parent 8f9a736 commit 7ea6607
Show file tree
Hide file tree
Showing 9 changed files with 151 additions and 153 deletions.
5 changes: 4 additions & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

187 changes: 92 additions & 95 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,33 @@
/*
* Copyright 2023 teogor (Teodor Grigor)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import com.diffplug.spotless.LineEnding
import com.vanniktech.maven.publish.SonatypeHost
import dev.teogor.winds.api.MavenPublish
import dev.teogor.winds.api.getValue
import dev.teogor.winds.api.model.Developer
import dev.teogor.winds.api.model.LicenseType
import dev.teogor.winds.api.model.createVersion
import dev.teogor.winds.api.provider.Scm
import dev.teogor.winds.gradle.tasks.impl.subprojectChildrens
import dev.teogor.winds.gradle.utils.afterWindsPluginConfiguration
import dev.teogor.winds.gradle.utils.attachTo
import dev.teogor.winds.api.ArtifactIdFormat
import dev.teogor.winds.api.License
import dev.teogor.winds.api.NameFormat
import dev.teogor.winds.api.Person
import dev.teogor.winds.api.Scm
import dev.teogor.winds.api.TicketSystem
import dev.teogor.winds.api.model.DependencyType
import dev.teogor.winds.ktx.createVersion
import dev.teogor.winds.ktx.person
import dev.teogor.winds.ktx.scm
import dev.teogor.winds.ktx.ticketSystem
import org.jetbrains.dokka.gradle.DokkaPlugin
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
repositories {
Expand All @@ -19,7 +36,6 @@ buildscript {
}
}

// Lists all plugins used throughout the project without applying them.
plugins {
alias(libs.plugins.jetbrains.kotlin.jvm) apply true
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
Expand All @@ -28,110 +44,80 @@ plugins {
alias(libs.plugins.teogor.winds) apply true
alias(libs.plugins.spotless) apply true
alias(libs.plugins.vanniktech.maven) apply true
}

subprojectChildrens {
val javaVersion = JavaVersion.VERSION_17
java {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
}

val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = javaVersion.toString()
}

val compileTestKotlin: KotlinCompile by tasks
compileTestKotlin.kotlinOptions {
jvmTarget = javaVersion.toString()
}
alias(libs.plugins.ben.manes.versions) apply true
alias(libs.plugins.littlerobots.version.catalog.update) apply true
}

winds {
buildFeatures {
mavenPublish = true

windsFeatures {
mavenPublishing = true
docsGenerator = true
workflowSynthesizer = true
}

mavenPublish {
displayName = "Querent"
name = "querent"

canBePublished = false
moduleMetadata {
name = "Querent"
description = "\uD83C\uDFD7\uFE0F Querent lays the groundwork for your project's resource " +
"management, fostering consistency and efficiency across your development workflow."

description =
"\uD83C\uDFD7\uFE0F Querent lays the groundwork for your project's resource management, fostering consistency and efficiency across your development workflow."
yearCreated = 2023

groupId = "dev.teogor.querent"
artifactIdElements = 1
url = "https://source.teogor.dev/querent"
websiteUrl = "https://source.teogor.dev/querent/"
apiDocsUrl = "https://source.teogor.dev/querent/html/"

version = createVersion(1, 0, 0) {
alphaRelease(2)
artifactDescriptor {
group = "dev.teogor.querent"
name = "Querent"
nameFormat = NameFormat.FULL
artifactIdFormat = ArtifactIdFormat.NAME_ONLY
version = createVersion(1, 0, 0) {
alphaRelease(3)
}
}

project.group = winds.mavenPublish.groupId ?: "undefined"
project.version = winds.mavenPublish.version ?: "undefined"

inceptionYear = 2023

sourceControlManagement(
Scm.Git(
owner = "teogor",
repo = "querent",
),
)
// Providing SCM (Source Control Management)
scm<Scm.GitHub> {
owner = "teogor"
repository = "querent"
}

addLicense(LicenseType.APACHE_2_0)
// Providing Ticket System
ticketSystem<TicketSystem.GitHub> {
owner = "teogor"
repository = "querent"
}

addDeveloper(TeogorDeveloper())
// Providing Licenses
licensedUnder(License.Apache2())

// Providing Persons
person<Person.DeveloperContributor> {
id = "teogor"
name = "Teodor Grigor"
email = "[email protected]"
url = "https://teogor.dev"
roles = listOf("Code Owner", "Developer", "Designer", "Maintainer")
timezone = "UTC+2"
organization = "Teogor"
organizationUrl = "https://github.com/teogor"
}
}

docsGenerator {
name = "Querent"
identifier = "querent"
alertOnDependentModules = true
publishingOptions {
publish = false
enablePublicationSigning = true
optInForVanniktechPlugin = true
cascadePublish = true
sonatypeHost = SonatypeHost.S01
}
}

afterWindsPluginConfiguration { winds ->
project.group = winds.mavenPublish.groupId ?: "undefined"
project.version = winds.mavenPublish.version ?: "undefined"

if (!plugins.hasPlugin("com.gradle.plugin-publish")) {
val mavenPublish: MavenPublish by winds
if (mavenPublish.canBePublished) {
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
signAllPublications()

@Suppress("UnstableApiUsage")
pom {
coordinates(
groupId = mavenPublish.groupId!!,
artifactId = mavenPublish.artifactId!!,
version = mavenPublish.version!!.toString(),
)
mavenPublish attachTo this
}
}
}
documentationBuilder {
htmlPath = "html/"
markdownNewlineSeparator = " "
dependencyGatheringType = DependencyType.NONE
}
}

data class TeogorDeveloper(
override val id: String = "teogor",
override val name: String = "Teodor Grigor",
override val email: String = "[email protected]",
override val url: String = "https://teogor.dev",
override val roles: List<String> = listOf("Code Owner", "Developer", "Designer", "Maintainer"),
override val timezone: String = "UTC+2",
override val organization: String = "Teogor",
override val organizationUrl: String = "https://github.com/teogor",
) : Developer

val ktlintVersion = "0.50.0"

val excludedProjects = listOf(
Expand Down Expand Up @@ -206,3 +192,14 @@ subprojects {
apply<DokkaPlugin>()
}
}

versionCatalogUpdate {
keep {
// keep versions without any library or plugin reference
keepUnusedVersions = true
// keep all libraries that aren't used in the project
keepUnusedLibraries = true
// keep all plugins that aren't used in the project
keepUnusedPlugins = true
}
}
9 changes: 4 additions & 5 deletions gradle-plugin-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ plugins {
}

dependencies {
// Xenoglot BoM
api(platform(libs.teogor.xenoglot.bom))
// Xenoglot Libraries
api(libs.teogor.xenoglot.core)

api(libs.androidx.annotation)
Expand All @@ -34,8 +32,9 @@ dependencies {
}

winds {
mavenPublish {
displayName = "Gradle Plugin API"
name = "gradle-plugin-api"
moduleMetadata {
artifactDescriptor {
name = "Gradle Plugin API"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ abstract class Blueprint(
* The method is responsible for enabling the code writer if the blueprint
* is enabled, and setting the namespace and package name for the blueprint.
*/
private fun CommonExtension<*, *, *, *, *>.onFinalizeDsl() {
private fun CommonExtension<*, *, *, *, *, *>.onFinalizeDsl() {
codeWriter.setEnabled(isEnabled())

logger.quiet("[$tag] ApplicationExtension::${extension<ApplicationExtension>() == null}")
Expand Down Expand Up @@ -422,7 +422,7 @@ abstract class Blueprint(
* The method is responsible for enabling the code writer if the blueprint
* is enabled, and setting the namespace and package name for the blueprint.
*/
open fun CommonExtension<*, *, *, *, *>.finalizeDsl() = Unit
open fun CommonExtension<*, *, *, *, *, *>.finalizeDsl() = Unit

/**
* Applies the blueprint to the project.
Expand Down
6 changes: 0 additions & 6 deletions gradle-plugin/api/gradle-plugin.api
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
public final class dev/teogor/querent/BuildConfig {
public static final field INSTANCE Ldev/teogor/querent/BuildConfig;
public static final field NAME Ljava/lang/String;
public static final field VERSION Ljava/lang/String;
}

public final class dev/teogor/querent/Plugin : org/gradle/api/Plugin {
public fun <init> ()V
public synthetic fun apply (Ljava/lang/Object;)V
Expand Down
7 changes: 4 additions & 3 deletions gradle-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ gradlePlugin {
}

winds {
mavenPublish {
displayName = "Gradle Plugin"
name = "gradle-plugin"
moduleMetadata {
artifactDescriptor {
name = "Gradle Plugin"
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class LanguagesSchema(data: FoundationData) : Blueprint(data) {

override fun isEnabled() = buildFeatures.languagesSchema

override fun CommonExtension<*, *, *, *, *>.finalizeDsl() {
override fun CommonExtension<*, *, *, *, *, *>.finalizeDsl() {
rawResourceConfig = defaultConfig.resourceConfigurations.toMutableSet()
}

Expand Down
Loading

0 comments on commit 7ea6607

Please sign in to comment.