Skip to content
Permalink
Browse files
apply same changes that made gradle 4.2.1 work
  • Loading branch information
Juhan Aasaru authored and Juhan Aasaru committed Sep 29, 2019
1 parent 46a1796 commit c3e04fc143a953a563325018fff9682eec6c8073
Showing 6 changed files with 30 additions and 28 deletions.
@@ -20,15 +20,15 @@ buildscript {
jcenter()
}

dependencies {
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
}
}

plugins {
id 'com.github.hierynomus.license' version '0.13.1'
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
id "io.spring.dependency-management" version "1.0.8.RELEASE"
id 'maven-publish'
id 'java'
}

apply from: '../shared.gradle'
@@ -45,7 +45,13 @@ task artifactoryPublish {
dependsOn gradle.includedBuild('api').task(':artifactoryPublish')
dependsOn gradle.includedBuild('service').task(':artifactoryPublish')
dependsOn gradle.includedBuild('component-test').task(':artifactoryPublish')
}

task clean {
group 'all'
dependsOn gradle.includedBuild('api').task(':clean')
dependsOn gradle.includedBuild('service').task(':clean')
dependsOn gradle.includedBuild('component-test').task(':clean')
}

task prepareForTest {
@@ -25,7 +25,6 @@ buildscript {
}

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.asciidoctor:asciidoctor-gradle-plugin:1.5.3")
}
}
@@ -34,6 +33,9 @@ plugins {
id 'com.github.hierynomus.license' version '0.13.1'
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
id "org.springframework.boot" version "1.4.3.RELEASE"
id 'maven-publish'
id 'java'
}

apply from: '../shared.gradle'
@@ -23,25 +23,23 @@ buildscript {
repositories {
jcenter()
}

dependencies {
classpath ("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}


plugins {
id 'com.github.hierynomus.license' version '0.13.1'
id("org.nosphere.apache.rat") version "0.3.1"
id "com.jfrog.artifactory" version "4.9.5"
id "org.springframework.boot" version "1.4.3.RELEASE"
id 'maven'
id 'maven-publish'
id 'java'
id 'idea'
}

apply from: '../shared.gradle'

apply plugin: 'spring-boot'

springBoot {
executable = true
bootRepackage {
enabled = true
classifier = 'boot'
}

@@ -72,7 +70,9 @@ dependencies {
)
}

publishToMavenLocal.dependsOn bootRepackage
tasks.withType(PublishToMavenLocal) { task ->
task.dependsOn 'bootRepackage'
}

publishing {
publications {
@@ -84,7 +84,7 @@ publishing {
}
bootService(MavenPublication) {
// "boot" jar
artifact ("$buildDir/libs/$project.name-$version-boot.jar")
artifact(file("$buildDir/libs/$project.name-$project.version-${bootRepackage.classifier}.jar"))
groupId project.group
artifactId ("$project.name-boot")
version project.findProperty('externalVersion') ?: project.version
@@ -23,21 +23,21 @@

public class JdbcUrlBuilderTest {

private final static String MARAIDB_JDBC_URL = "jdbc:mariadb://localhost:3306/comp_test";
private final static String POSTGRES_DB_JDBC_URL = "jdbc:postgresql:localhost:5432/comp_test";

public JdbcUrlBuilderTest() {
super();
}

@Test
public void shouldCreateMysqlUrl() {
final String mariaDbJdbcUrl = JdbcUrlBuilder
.create(JdbcUrlBuilder.DatabaseType.MARIADB)
public void shouldCreatePostgresUrl() {
final String postgresDbUrl = JdbcUrlBuilder
.create(JdbcUrlBuilder.DatabaseType.POSTGRESQL)
.host("localhost")
.port("3306")
.port("5432")
.instanceName("comp_test")
.build();

Assert.assertEquals(MARAIDB_JDBC_URL, mariaDbJdbcUrl);
Assert.assertEquals(POSTGRES_DB_JDBC_URL, postgresDbUrl);
}
}
@@ -34,12 +34,6 @@ ext.versions = [
validator : '5.3.0.Final'
]


apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'io.spring.dependency-management'

tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
@@ -77,7 +71,7 @@ dependencies {
}

jar {
from sourceSets.main.allSource
from sourceSets.main.java
}

artifactory {

0 comments on commit c3e04fc

Please sign in to comment.