1+ /*
2+ * ========================LICENSE_START=================================
3+ * AEM Permission Management
4+ * %%
5+ * Copyright (C) 2013 Cognifide Limited
6+ * %%
7+ * Licensed under the Apache License, Version 2.0 (the "License");
8+ * you may not use this file except in compliance with the License.
9+ * You may obtain a copy of the License at
10+ *
11+ * http://www.apache.org/licenses/LICENSE-2.0
12+ *
13+ * Unless required by applicable law or agreed to in writing, software
14+ * distributed under the License is distributed on an "AS IS" BASIS,
15+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+ * See the License for the specific language governing permissions and
17+ * limitations under the License.
18+ * =========================LICENSE_END==================================
19+ */
20+
21+ import org.gradle.api.tasks.testing.logging.TestLogEvent
22+
23+ allprojects {
24+ repositories {
25+ mavenLocal()
26+ jcenter()
27+ }
28+
29+ plugins.withId(" kotlin" ) {
30+ tasks.withType<Test >().configureEach {
31+ failFast = true
32+ useJUnitPlatform()
33+ testLogging {
34+ events = setOf (
35+ TestLogEvent .STANDARD_OUT ,
36+ TestLogEvent .STANDARD_ERROR ,
37+ TestLogEvent .FAILED ,
38+ TestLogEvent .PASSED ,
39+ TestLogEvent .SKIPPED
40+ )
41+ }
42+ }
43+
44+ dependencies {
45+ " implementation" (kotlin(" stdlib-jdk8" ))
46+ " implementation" (" org.junit.jupiter:junit-jupiter-api:5.5.1" )
47+ " implementation" (" org.junit.jupiter:junit-jupiter-params:5.5.1" )
48+ " testRuntime" (" org.junit.jupiter:junit-jupiter-engine:5.5.1" )
49+ }
50+ }
51+
52+ afterEvaluate {
53+ val apmtRepositoryUsername: String? by extra
54+ val apmtRepositoryPassword: String? by extra
55+ extensions.findByType(PublishingExtension ::class )?.apply {
56+ publications?.findByName(" apmt" )?.apply {
57+ if (this is MavenPublication ) {
58+ pom {
59+ name.set(" APMT" )
60+ description.set(" AEM Permission Matrix Tester" )
61+ url.set(" https://github.com/Cognifide/apmt" )
62+ licenses {
63+ license {
64+ name.set(" The Apache License, Version 2.0" )
65+ url.set(" http://www.apache.org/licenses/LICENSE-2.0.txt" )
66+ }
67+ }
68+ developers {
69+ developer {
70+ name.set(" Marcin Jędraszczyk" )
71+ email.set(" marcin.jedraszczyk@cognifide.com" )
72+ organization.set(" Cognifide" )
73+ organizationUrl.set(" https://www.cognifide.com" )
74+ }
75+ developer {
76+ name.set(" Michał Krzyżanowski" )
77+ email.set(" michal.krzyzanowski@cognifide.com" )
78+ organization.set(" Cognifide" )
79+ organizationUrl.set(" https://www.cognifide.com" )
80+ }
81+ developer {
82+ name.set(" Bartosz Zbytniewski" )
83+ email.set(" bartosz.zbytniewski@cognifide.com" )
84+ organization.set(" Cognifide" )
85+ organizationUrl.set(" https://www.cognifide.com" )
86+ }
87+ }
88+ scm {
89+ connection.set(" https://github.com/Cognifide/apmt.git" )
90+ developerConnection.set(" https://github.com/Cognifide/apmt.git" )
91+ url.set(" https://github.com/Cognifide/apmt" )
92+ }
93+ }
94+ }
95+ }
96+ repositories {
97+ maven {
98+ name = " OSSSonatypeOrg"
99+ url = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2/" )
100+ credentials {
101+ username = apmtRepositoryUsername
102+ password = apmtRepositoryPassword
103+ }
104+ authentication {
105+ create<BasicAuthentication >(" basic" )
106+ }
107+ }
108+ }
109+ }
110+
111+ extensions.findByType(SigningExtension ::class )?.apply {
112+ useGpgCmd()
113+ val publication = extensions.findByType(PublishingExtension ::class )?.publications?.findByName(" apmt" )
114+ if (publication != null ) {
115+ sign(publication)
116+ }
117+ }
118+ }
119+ }
0 commit comments