-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
189 lines (160 loc) · 6.61 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
buildscript {
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:3.0.10"
classpath "io.github.gradle-nexus:publish-plugin:1.0.0"
}
}
version "1.0.2"
group "io.github.vahidhedayati"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"org.grails.grails-plugin"
//apply plugin:"org.grails.grails-plugin-publish"
apply plugin:"asset-pipeline"
apply plugin:"org.grails.grails-gsp"
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: "io.github.gradle-nexus.publish-plugin"
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
ext."signing.keyId" = project.hasProperty("signing.keyId") ? project.getProperty('signing.keyId') : System.getenv('SIGNING_KEY_ID')
ext."signing.password" = project.hasProperty("signing.password") ? project.getProperty('signing.password') : System.getenv('SIGNING_PASSPHRASE')
ext."signing.secretKeyRingFile" = project.hasProperty("signing.secretKeyRingFile") ? project.getProperty('signing.secretKeyRingFile') : (System.getenv('SECRING_FILE')?:"${System.properties['user.home']}${File.separator}.gnupg${File.separator}secring.gpg")
repositories {
maven { url "https://repo.grails.org/grails/core" }
}
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
developmentOnly("org.springframework.boot:spring-boot-devtools")
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-i18n"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails.plugins:cache"
compile "org.grails.plugins:async"
compile "org.grails.plugins:scaffolding"
compile "org.grails.plugins:gsp"
profile "org.grails.profiles:web-plugin"
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
// testCompile "org.grails:grails-gorm-testing-support"
compile "org.grails.plugins:hibernate5"
//paypal
compile group: 'com.paypal.sdk', name: 'rest-api-sdk', version: '1.14.0'
String httpclientVersion = '4.3.6'
compile "org.apache.httpcomponents:httpclient:$httpclientVersion"
compile "org.apache.httpcomponents:fluent-hc:$httpclientVersion"
compile "org.apache.httpcomponents:httpclient-cache:$httpclientVersion"
compile "org.apache.httpcomponents:httpmime:$httpclientVersion"
//generates timebased uuids used as idempotencyKey
compile 'com.fasterxml.uuid:java-uuid-generator:4.0'
compile group: 'com.paypal.sdk', name: 'checkout-sdk', version: '1.0.2'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.6'
runtime "com.bertramlabs.plugins:asset-pipeline-grails:3.0.10"
//testCompile "org.grails:grails-gorm-testing-support"
testCompile "org.mockito:mockito-core"
testCompile "org.grails:grails-web-testing-support"
//Stripe Payment libraries
compile 'com.stripe:stripe-java:20.55.0'
//Square payment libraries
compile 'com.squareup:square:11.0.0.20210513'
// compile 'org.jetbrains.kotlin:kotlin-stdlib:1.3.70'
}
bootRun {
ignoreExitValue true
jvmArgs(
'-Dspring.output.ansi.enabled=always',
'-noverify',
'-XX:TieredStopAtLevel=1',
'-Xmx1024m')
sourceResources sourceSets.main
String springProfilesActive = 'spring.profiles.active'
systemProperty springProfilesActive, System.getProperty(springProfilesActive)
}
tasks.withType(GroovyCompile) {
configure(groovyOptions) {
forkOptions.jvmArgs = ['-Xmx1024m']
}
}
// enable if you wish to package this plugin as a standalone application
bootJar.enabled = false
afterEvaluate {
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publish") }
sign publishing.publications.maven
}
}
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
nexusPublishing {
repositories {
sonatype {
def ossUser = System.getenv("SONATYPE_USERNAME") ?: project.hasProperty("sonatypeOssUsername") ? project.sonatypeOssUsername : ''
def ossPass = System.getenv("SONATYPE_PASSWORD") ?: project.hasProperty("sonatypeOssPassword") ? project.sonatypeOssPassword : ''
def ossStagingProfileId = System.getenv("SONATYPE_STAGING_PROFILE_ID") ?: project.hasProperty("sonatypeOssStagingProfileId") ? project.sonatypeOssStagingProfileId : ''
nexusUrl = uri("https://s01.oss.sonatype.org/service/local/")
snapshotRepositoryUrl = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")
username = ossUser
password = ossPass
stagingProfileId = ossStagingProfileId
}
}
}
publishing {
repositories {
mavenLocal()
}
publications {
maven(MavenPublication) {
groupId = project.group
artifactId = 'payment'
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = 'Grails Payment plugin'
description = 'Centralised payment system for Paypal, Stripe & Square'
url = 'https://github.com/vahidhedayati/grails-payment'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'vahidhedayati'
name = 'Vahid Hedayati'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:git://github.com/vahidhedayati/grails-payment.git'
developerConnection = 'scm:git:ssh://github.com:vahidhedayati/grails-payment.git'
url = 'https://github.com/vahidhedayati/grails-payment/tree/main'
}
}
}
}
}
assets {
packagePlugin = true
}