Updated the sample gradle modules
This commit is contained in:
parent
0b768ee073
commit
32b8d4a2d1
12
README.md
12
README.md
@ -1,28 +1,32 @@
|
|||||||
# Sample Modules
|
# Sample Modules
|
||||||
- Including parent deps
|
|
||||||
- Spring Boot
|
- Spring Boot with Kotlin
|
||||||
- Spring Dependency Management
|
- Spring Dependency Management
|
||||||
- Gradle with Kotlin DSL (6.6.1)
|
- Gradle with Kotlin DSL
|
||||||
- Kotlin Langauge
|
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
- Clone the modules
|
- Clone the modules
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://git.cubetiqs.com/CUBETIQ/sample-modules.git --recurse-submodules --remote-submodules
|
git clone https://git.cubetiqs.com/CUBETIQ/sample-modules.git --recurse-submodules --remote-submodules
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add Submodule by using git submodule (Example)
|
### Add Submodule by using git submodule (Example)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git submodule add https://git.cubetiqs.com/CUBETIQ/gradle-sample-module-example.git
|
git submodule add https://git.cubetiqs.com/CUBETIQ/gradle-sample-module-example.git
|
||||||
```
|
```
|
||||||
|
|
||||||
### Register module in ```settings.gradle.kts``` or ```settings.gradle```
|
### Register module in ```settings.gradle.kts``` or ```settings.gradle```
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
rootProject.name = "sample-modules"
|
rootProject.name = "sample-modules"
|
||||||
include("gradle-sample-module-example")
|
include("gradle-sample-module-example")
|
||||||
```
|
```
|
||||||
|
|
||||||
### Implementation module in ```build.gradle.kts```
|
### Implementation module in ```build.gradle.kts```
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
implementation(project(":gradle-sample-module-example"))
|
implementation(project(":gradle-sample-module-example"))
|
||||||
```
|
```
|
@ -1,33 +1,15 @@
|
|||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||||
|
|
||||||
buildscript {
|
|
||||||
repositories {
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.springframework.boot") version "2.4.0" apply false
|
id("org.springframework.boot") version "2.7.1" apply false
|
||||||
id("io.spring.dependency-management") version "1.0.10.RELEASE" apply false
|
id("io.spring.dependency-management") version "1.0.12.RELEASE" apply false
|
||||||
kotlin("jvm") version "1.4.10" apply false
|
kotlin("jvm") version "1.7.10" apply false
|
||||||
kotlin("plugin.spring") version "1.4.10" apply false
|
kotlin("plugin.spring") version "1.7.10" apply false
|
||||||
}
|
}
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
group = "com.cubetiqs.modules"
|
group = "com.cubetiqs.modules"
|
||||||
version = "0.0.1-SNAPSHOT"
|
version = "0.0.1-SNAPSHOT"
|
||||||
|
|
||||||
tasks.withType<JavaCompile> {
|
|
||||||
sourceCompatibility = "11"
|
|
||||||
targetCompatibility = "11"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<KotlinCompile> {
|
|
||||||
kotlinOptions {
|
|
||||||
freeCompilerArgs = listOf("-Xjsr305=strict")
|
|
||||||
jvmTarget = "11"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
@ -38,4 +20,15 @@ subprojects {
|
|||||||
apply {
|
apply {
|
||||||
plugin("io.spring.dependency-management")
|
plugin("io.spring.dependency-management")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<KotlinCompile> {
|
||||||
|
kotlinOptions {
|
||||||
|
freeCompilerArgs = listOf("-Xjsr305=strict")
|
||||||
|
jvmTarget = "17"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test> {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
}
|
}
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
Loading…
Reference in New Issue
Block a user