Setup Gradle multi-module build
Added core, config and samples modules. Moved sample project into samples module. Closes gh-10
This commit is contained in:
parent
c9a7fc124c
commit
5ed7c8f501
@ -23,7 +23,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
java-version: ${{ matrix.jdk }}
|
java-version: ${{ matrix.jdk }}
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: echo Starting build
|
run: ./gradlew clean build
|
||||||
snapshot_tests:
|
snapshot_tests:
|
||||||
name: Test against snapshots
|
name: Test against snapshots
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
30
build.gradle
30
build.gradle
@ -1,24 +1,28 @@
|
|||||||
plugins {
|
buildscript {
|
||||||
id 'org.springframework.boot' version '2.2.6.RELEASE'
|
dependencies {
|
||||||
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
|
classpath 'io.spring.gradle:spring-build-conventions:0.0.31.RELEASE'
|
||||||
id 'java'
|
classpath "org.springframework.boot:spring-boot-gradle-plugin:latest.release"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
repositories {
|
||||||
|
maven { url 'https://repo.spring.io/plugins-snapshot' }
|
||||||
|
maven { url 'https://plugins.gradle.org/m2/' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
apply plugin: 'io.spring.convention.root'
|
||||||
|
|
||||||
group = 'org.springframework.experimental'
|
group = 'org.springframework.experimental'
|
||||||
version = '0.0.1-SNAPSHOT'
|
version = '0.0.1-SNAPSHOT'
|
||||||
sourceCompatibility = '1.8'
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencyManagementExport.projects = subprojects
|
||||||
implementation 'org.springframework.boot:spring-boot-starter'
|
|
||||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
|
||||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
test {
|
subprojects {
|
||||||
useJUnitPlatform()
|
plugins.withType(JavaPlugin) {
|
||||||
|
project.sourceCompatibility = '1.8'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
1
config/spring-authorization-server-config.gradle
Normal file
1
config/spring-authorization-server-config.gradle
Normal file
@ -0,0 +1 @@
|
|||||||
|
apply plugin: 'io.spring.convention.spring-module'
|
1
core/spring-authorization-server-core.gradle
Normal file
1
core/spring-authorization-server-core.gradle
Normal file
@ -0,0 +1 @@
|
|||||||
|
apply plugin: 'io.spring.convention.spring-module'
|
11
gradle/dependency-management.gradle
Normal file
11
gradle/dependency-management.gradle
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
dependencyManagement {
|
||||||
|
imports {
|
||||||
|
mavenBom 'org.springframework:spring-framework-bom:latest.release'
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
dependency 'junit:junit:latest.release'
|
||||||
|
dependency 'org.assertj:assertj-core:latest.release'
|
||||||
|
dependency 'org.mockito:mockito-core:latest.release'
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,12 @@
|
|||||||
|
apply plugin: 'io.spring.convention.spring-sample-boot'
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter'
|
||||||
|
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||||
|
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
@ -1 +1,16 @@
|
|||||||
rootProject.name = 'spring-authorization-server'
|
rootProject.name = 'spring-authorization-server'
|
||||||
|
|
||||||
|
FileTree buildFiles = fileTree(rootDir) {
|
||||||
|
include '**/*.gradle'
|
||||||
|
exclude 'build', '**/gradle', 'settings.gradle', 'buildSrc', '/build.gradle', '.*', 'out'
|
||||||
|
}
|
||||||
|
|
||||||
|
buildFiles.each { File buildFile ->
|
||||||
|
String projectName = buildFile.name.replace('.gradle', '');
|
||||||
|
String projectPath = ':' + projectName;
|
||||||
|
include projectPath
|
||||||
|
def project = findProject("${projectPath}")
|
||||||
|
project.name = projectName
|
||||||
|
project.projectDir = buildFile.parentFile
|
||||||
|
project.buildFileName = buildFile.name
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user