-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
119 lines (100 loc) · 3.87 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
plugins {
id 'java'
id 'groovy'
id 'java-gradle-plugin'
id 'com.gradle.plugin-publish' version '0.15.0'
id 'nu.studer.credentials' version '2.1'
id 'idea'
id 'eclipse'
}
repositories {
mavenCentral()
}
group = 'org.hibernate.build'
version = '3.1.2-SNAPSHOT'
buildDir = "target"
dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.apache.ant:ant:1.8.2'
}
gradlePlugin {
plugins {
matrixProfilePlugin {
id = 'org.hibernate.matrix-profile'
implementationClass = 'org.hibernate.build.gradle.testing.database.DatabaseProfilePlugin'
}
matrixTestPlugin {
id = 'org.hibernate.matrix-test'
implementationClass = 'org.hibernate.build.gradle.testing.matrix.MatrixTestingPlugin'
}
}
}
pluginBundle {
website = 'https://github.com/hibernate/hibernate-matrix-testing'
vcsUrl = 'https://github.com/hibernate/hibernate-orm/tree/main/tooling/hibernate-gradle-plugin'
tags = ['hibernate','orm','bytecode','enhancement','bytebuddy']
mavenCoordinates {
groupId = project.group.toString()
artifactId = project.name
version = project.version.toString()
}
plugins {
matrixTestPlugin {
displayName = 'Gradle plugin for running tests against multiple databases'
description = 'Gradle plugin for running tests against multiple databases'
}
matrixProfilePlugin {
displayName = 'Gradle plugin for defining "database profiles" against which to run tests'
description = 'Gradle plugin for defining "database profiles" against which to run tests'
}
}
}
if ( version.toString().endsWith( '-SNAPSHOT' ) ) {
tasks.publishPlugins.enabled = false
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
idea {
project {
languageLevel = '1.8'
}
module {
downloadSources = true
downloadJavadoc = false
}
}
ext {
// look for command-line overrides of the username/password pairs for publishing
if ( project.hasProperty( 'hibernatePluginPortalUsername' ) ) {
if ( ! project.hasProperty( 'hibernatePluginPortalPassword' ) ) {
throw new GradleException( "Should specify both `hibernatePluginPortalUsername` and `hibernatePluginPortalPassword` as project properties" );
}
credentials.hibernatePluginPortalUsername = project.property( 'hibernatePluginPortalUsername' )
credentials.hibernatePluginPortalPassword = project.property( 'hibernatePluginPortalPassword' )
}
else if ( System.properties.hibernatePluginPortalUsername != null ) {
if ( System.properties.hibernatePluginPortalPassword == null ) {
throw new GradleException( "Should specify both `hibernatePluginPortalUsername` and `hibernatePluginPortalPassword` as system properties" );
}
credentials.hibernatePluginPortalUsername = System.properties.hibernatePluginPortalUsername
credentials.hibernatePluginPortalPassword = System.properties.hibernatePluginPortalPassword
}
project.setProperty( 'gradle.publish.key', credentials.hibernatePluginPortalUsername )
project.setProperty( 'gradle.publish.secret', credentials.hibernatePluginPortalPassword )
}
gradle.taskGraph.whenReady { tg ->
if ( tg.hasTask( project.tasks.publishPlugins ) ) {
if ( credentials.hibernatePluginPortalUsername == null ) {
throw new RuntimeException( "`hibernatePluginPortalUsername` not found" )
}
if ( credentials.hibernatePluginPortalPassword == null ) {
throw new RuntimeException( "`hibernatePluginPortalPassword` not found" )
}
}
}
wrapper {
// To upgrade the version of gradle used in the wrapper, run:
// ./gradlew wrapper --gradle-version NEW_VERSION
distributionType = Wrapper.DistributionType.ALL
}