mirror of
https://github.com/google/nomulus.git
synced 2025-07-14 06:55:20 +02:00
Add maven-publish task for SQL schema jar (#289)
* Add maven-publish task for SQL schema jar Add task to publish SQL schema jar with flyway scripts and golden schema to a maven repo. This will be used for pre-release testing in the future. This task is not part of build and needs to be invoked explicitly. User needs to provide schema_jar_repo and schema_version properties. * Merge branch 'master' of https://github.com/google/nomulus into publish-schema-jar * Add maven-publish task for SQL schema jar Add task to publish SQL schema jar with flyway scripts and golden schema to a maven repo. This will be used for pre-release testing in the future. This task is not part of build and needs to be invoked explicitly. User needs to provide schema_jar_repo and schema_version properties.
This commit is contained in:
parent
cc018a6dac
commit
964f264c9d
2 changed files with 35 additions and 2 deletions
|
@ -12,10 +12,9 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "org.flywaydb.flyway" version "6.0.1"
|
id "org.flywaydb.flyway" version "6.0.1"
|
||||||
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
|
@ -75,6 +74,35 @@ ext {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task schemaJar(type: Jar) {
|
||||||
|
archiveBaseName = 'schema'
|
||||||
|
from(sourceSets.main.resources) {
|
||||||
|
include 'sql/flyway/**'
|
||||||
|
include 'sql/schema/nomulus.golden.sql'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
artifacts {
|
||||||
|
archives schemaJar
|
||||||
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
maven {
|
||||||
|
url project.schema_jar_repo
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
schemaOrmPublication(MavenPublication) {
|
||||||
|
groupId 'google.registry'
|
||||||
|
artifactId 'schema'
|
||||||
|
version project.schema_version
|
||||||
|
artifact schemaJar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
flyway {
|
flyway {
|
||||||
def accessInfo = project.ext.getJdbcAccessInfo()
|
def accessInfo = project.ext.getJdbcAccessInfo()
|
||||||
|
|
||||||
|
|
|
@ -15,3 +15,8 @@ dbServer=
|
||||||
dbName=postgres
|
dbName=postgres
|
||||||
dbUser=
|
dbUser=
|
||||||
dbPassword=
|
dbPassword=
|
||||||
|
|
||||||
|
# Maven repository of the Cloud SQL schema jar, which contains the
|
||||||
|
# SQL DDL scripts.
|
||||||
|
schema_jar_repo=
|
||||||
|
schema_version=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue