fixed build

develop
bvn13 2020-04-03 16:51:54 +03:00
parent 785a231989
commit a635c29eda
19 changed files with 90 additions and 53 deletions

View File

@ -1,49 +1,36 @@
buildscript {
ext {
springBootVersion = '2.2.6.RELEASE'
springBootDependenciesVersion = '1.0.9.RELEASE'
}
repositories {
maven { url 'https://repo.spring.io/milestone' }
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:dependency-management-plugin:${springBootDependenciesVersion}"
}
}
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'java'
}
allprojects {
repositories {
mavenCentral()
}
}
//allprojects {
// repositories {
// mavenCentral()
// jcenter()
// maven { url "https://plugins.gradle.org/m2/" }
// maven { url 'https://repo.spring.io/milestone' }
// }
//}
subprojects {
project.ext {
camelVersion = '3.1.0'
springBootDependenciesVersion = '2.2.2.RELEASE'
springBootVersion = '2.2.6.RELEASE'
springBootDependenciesVersion = '2.2.6.RELEASE'
fasterxmlJacksonVersion = '2.10.0'
apacheCommonsCollectionsVersion = '4.4'
apacheCommonsLangVersion = '3.9'
}
group = 'com.bvn13.covid19'
version = '0.0.1'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
// apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'com.bvn13.covid19'
sourceCompatibility = 1.8
targetCompatibility = 1.8
@ -52,16 +39,16 @@ subprojects {
mavenCentral()
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
@ -96,3 +83,5 @@ subprojects {
defaultTasks('clean', 'compileTestJava', 'jar')
bootJar { enabled = false }
jar { enabled = false }

View File

@ -32,3 +32,4 @@ out/
.vscode/
.gradle/
gradle-old/

View File

@ -13,6 +13,6 @@ dependencies {
}
bootJar {
springBoot {
mainClassName 'com.bvn13.covid19.api.Covid19ApiApplication'
}

Binary file not shown.

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,9 +1,19 @@
package com.bvn13.covid19.covid19api;
package com.bvn13.covid19.api;
import com.bvn13.covid19.model.Covid19ModelConfig;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Profile;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@SpringBootTest
@EnableJpaRepositories("com.bvn13.covid19.scheduler")
@ContextConfiguration(
classes = { Covid19ModelConfig.class },
loader = AnnotationConfigContextLoader.class)
@Profile("test")
class Covid19ApiApplicationTests {
@Test

View File

@ -0,0 +1,8 @@
jdbc:
driverClassName: org.h2.Driver
url: "jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1"
hibernate:
dialect: org.hibernate.dialect.H2Dialect
hbm2ddl:
auto: create

View File

@ -32,3 +32,4 @@ out/
.vscode/
.gradle/
gradle-old/

View File

@ -1,11 +1,11 @@
//apply plugin: 'org.springframework.boot.gradle.plugin.SpringBootPlugin'
version = '0.0.1'
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
testImplementation 'com.h2database:h2:1.4.194'
}
bootJar { enabled = false }
jar { enabled = true }
//bootJar { enabled = false }
//jar { enabled = true }

Binary file not shown.

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -2,8 +2,16 @@ package com.bvn13.covid19.model;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Profile;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@SpringBootTest
@ContextConfiguration(
classes = { Covid19ModelConfig.class },
loader = AnnotationConfigContextLoader.class)
@Profile("test")
class Covid19ModelApplicationTests {
@Test

View File

@ -0,0 +1,8 @@
jdbc:
driverClassName: org.h2.Driver
url: "jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1"
hibernate:
dialect: org.hibernate.dialect.H2Dialect
hbm2ddl:
auto: create

View File

@ -32,3 +32,4 @@ out/
.vscode/
.gradle/
gradle-old/

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,9 +1,19 @@
package com.bvn13.covid19.scheduler;
import com.bvn13.covid19.model.Covid19ModelConfig;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Profile;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.support.AnnotationConfigContextLoader;
@SpringBootTest
@EnableJpaRepositories("com.bvn13.covid19.scheduler")
@ContextConfiguration(
classes = { Covid19ModelConfig.class },
loader = AnnotationConfigContextLoader.class)
@Profile("test")
class Covid19SchedulerApplicationTests {
@Test

View File

@ -0,0 +1,8 @@
jdbc:
driverClassName: org.h2.Driver
url: "jdbc:h2:mem:myDb;DB_CLOSE_DELAY=-1"
hibernate:
dialect: org.hibernate.dialect.H2Dialect
hbm2ddl:
auto: create

View File

@ -1,3 +1,11 @@
pluginManagement {
repositories {
gradlePluginPortal()
}
}
rootProject.name = 'covid19'
include ':covid19-model'
include ':covid19-api'
include ':covid19-scheduler'