Skip to content

Commit

Permalink
Move build to root folder, include both dumper and client tools (#11
Browse files Browse the repository at this point in the history
)

* Move gradle configuration up one level

* Workaround api() not getting pinned versions from buildSrc/conventions

* Gradle, build package with both client and dumper

* Update ignore files to ignore dot-folders

* Fix bin/dwg-migration-dumper to invoke new build layout
  • Loading branch information
paolomorandini authored May 20, 2022
1 parent 82319fc commit 4c01a47
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ build
*~
*#
*.pyc

.gradle
2 changes: 1 addition & 1 deletion bin/dwh-migration-dumper
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BIN=$(dirname $(readlink -f $0))/../dumper/app/build/install/app/bin/dwh-migration-dumper

if [ ! -x "$BIN" ] ; then
(cd dumper && ./gradlew --parallel :app:installDist)
./gradlew --parallel :dumper:app:installDist
fi

exec "$BIN" "$@"
21 changes: 21 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apply {
plugin 'java-library-distribution'
}

distributions {
published {
distributionBaseName = "dwh-migration-tools"
contents {
from("client") {
exclude "**/__pycache__"
into "client"
}
from("bin/dwh-migration-client") {
into "bin"
}
project(":dumper:app").afterEvaluate {
from it.tasks.installPublishedDist
}
}
}
}
File renamed without changes.
5 changes: 0 additions & 5 deletions dumper/.gitignore

This file was deleted.

12 changes: 7 additions & 5 deletions dumper/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ configurations {
}

dependencies {
implementation project(':lib-common')
implementation project(':lib-dumper-spi')
implementation project(':lib-ext-bigquery')
implementation project(':lib-ext-hive-metastore')
implementation project(':dumper:lib-common')
implementation project(':dumper:lib-dumper-spi')
implementation project(':dumper:lib-ext-bigquery')
implementation project(':dumper:lib-ext-hive-metastore')

implementation "com.google.guava:guava"
implementation "net.sf.jopt-simple:jopt-simple"
Expand All @@ -48,12 +48,14 @@ dependencies {
implementation "org.springframework:spring-jdbc"
implementation "com.zaxxer:HikariCP"
implementation "com.swrve:rate-limited-logger"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"
implementation "com.google.cloud:google-cloud-bigquery"

runtimeOnly "ch.qos.logback:logback-classic"
runtimeOnly "org.slf4j:jcl-over-slf4j"

testFixturesApi testFixtures(project(':lib-common'))
testFixturesApi testFixtures(project(':dumper:lib-common'))

testImplementation "org.xerial:sqlite-jdbc"
testImplementation "org.postgresql:postgresql"
Expand Down
2 changes: 1 addition & 1 deletion dumper/lib-dumper-spi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ plugins {
}

dependencies {
api "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml"
}
2 changes: 1 addition & 1 deletion dumper/lib-ext-bigquery/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ plugins {

dependencies {
implementation "com.swrve:rate-limited-logger"
api "com.google.cloud:google-cloud-bigquery"
implementation "com.google.cloud:google-cloud-bigquery"
}
8 changes: 0 additions & 8 deletions dumper/settings.gradle

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
rootProject.name = 'dwh-migration-dumper'
include(
':dumper:lib-common',
':dumper:lib-dumper-spi',
':dumper:lib-ext-bigquery',
':dumper:lib-ext-hive-metastore',
':dumper:app'
)

0 comments on commit 4c01a47

Please sign in to comment.