Skip to content

Instantly share code, notes, and snippets.

View ahatzz11's full-sized avatar
🌮
🐢

Alex Hatzenbuhler ahatzz11

🌮
🐢
View GitHub Profile
@ahatzz11
ahatzz11 / build.gradle.kts
Last active July 1, 2022 00:53
Gradle task to lock all subprojects
// This task performs a dependency lock on the main project as well as every subproject.
// This should stay create so that all the projects get the dependencyLocking config applied right away
// This isn't normal lazy gradle, but it is self-contained and that is nice
tasks.create<Exec>("lockItUp") {
allprojects {
// allprojects needs this
dependencyLocking {
lockAllConfigurations()
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} | %highlight(%-5level) | %gray(%-40logger{20}) | %-20thread{20} | MDC:[%mdc] | - %msg%n%xEx</pattern>
</encoder>
</appender>
<logger name="Exposed" level="INFO">
<appender-ref ref="STDOUT" />
</logger>
package com.hatz.test
import com.tngtech.archunit.core.domain.JavaClasses
import com.tngtech.archunit.core.importer.ClassFileImporter
import groovy.util.logging.Slf4j
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.context.annotation.Configuration
import org.springframework.stereotype.Service
import org.springframework.web.bind.annotation.RestController
import spock.lang.Ignore
Use the latest version of all existing tech
Technology:
- Groovy as the language // don't use 3.x, it's beta still
- Springboot as the framework
- Gradle for building
Business Requirements:
Create an API that takes manages products.
- Can create object