Skip to content

Refactor to Binary plugins #337

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open
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
78 changes: 1 addition & 77 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,81 +1,5 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.idea/

### Gradle template
.gradle
Expand Down
10 changes: 0 additions & 10 deletions .idea/.gitignore

This file was deleted.

22 changes: 0 additions & 22 deletions .idea/dataSources.xml

This file was deleted.

104 changes: 0 additions & 104 deletions .idea/icon.svg

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/kotlinc.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/sqldialects.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=21.0.4-librca
gradle=8.9
gradle=8.10
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ USER spring:spring
WORKDIR /home/spring
# copy jar and run it
ARG BUILD_ROOT=/usr/src/app
ARG BOOT_JAR=$BUILD_ROOT/server/build/libs/*.jar
ARG BOOT_JAR=$BUILD_ROOT/server/build/libs/*boot.jar
COPY --from=build $BOOT_JAR ./app.jar
ENTRYPOINT ["java","-jar","./app.jar"]

Expand Down
46 changes: 46 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
`kotlin-dsl`
alias(libs.plugins.spotless)
}

repositories {
Expand All @@ -17,3 +18,48 @@ dependencies {
implementation(kotlin("stdlib-jdk8", "2.0.20"))
implementation(kotlin("noarg", "2.0.20"))
}

spotless {
kotlin {
ktlint()
}
}

gradlePlugin {
val dependencyManagement by plugins.creating {
id = "hu.bsstudio.dependency-management"
implementationClass = "hu.bsstudio.DependencyManagement"
}
val integrationTestingConventions by plugins.creating {
id = "hu.bsstudio.integration-testing-conventions"
implementationClass = "hu.bsstudio.IntegrationTestingConventions"
}
val javaConventions by plugins.creating {
id = "hu.bsstudio.java-conventions"
implementationClass = "hu.bsstudio.JavaConventions"
}
val kotlinConventions by plugins.creating {
id = "hu.bsstudio.kotlin-conventions"
implementationClass = "hu.bsstudio.KotlinConventions"
}
val kotlinTestingConventions by plugins.creating {
id = "hu.bsstudio.kotlin-testing-conventions"
implementationClass = "hu.bsstudio.KotlinTestingConventions"
}
val spotlessConventions by plugins.creating {
id = "hu.bsstudio.spotless-conventions"
implementationClass = "hu.bsstudio.SpotlessConventions"
}
val springAppConventions by plugins.creating {
id = "hu.bsstudio.spring-app-conventions"
implementationClass = "hu.bsstudio.SpringAppConventions"
}
val springModuleConventions by plugins.creating {
id = "hu.bsstudio.spring-module-conventions"
implementationClass = "hu.bsstudio.SpringModuleConventions"
}
val testingConventions by plugins.creating {
id = "hu.bsstudio.testing-conventions"
implementationClass = "hu.bsstudio.TestingConventions"
}
}
14 changes: 0 additions & 14 deletions buildSrc/src/main/kotlin/dependency-management.gradle.kts

This file was deleted.

25 changes: 25 additions & 0 deletions buildSrc/src/main/kotlin/hu/bsstudio/DependencyManagement.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package hu.bsstudio

import io.spring.gradle.dependencymanagement.DependencyManagementPlugin
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.repositories

class DependencyManagement : Plugin<Project> {
override fun apply(project: Project) {
project.pluginManager.apply(JavaConventions::class)
project.pluginManager.apply(DependencyManagementPlugin::class)

project.repositories {
add(mavenCentral())
}

project.dependencies {
add("api", enforcedPlatform("org.springframework.boot:spring-boot-dependencies:3.3.3"))
add("api", enforcedPlatform("org.springframework.shell:spring-shell-dependencies:3.3.2"))
add("api", enforcedPlatform("org.springframework.cloud:spring-cloud-dependencies:2023.0.3"))
}
}
}
Loading
Loading