-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
140 lines (123 loc) · 3.89 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
/*
* Copyright 2018 HP Development Company, L.P.
* SPDX-License-Identifier: MIT
*/
ext {
kotlin_version = '1.3.72'
kalexa_version = '0.6.0'
jackson_version = '2.9.8'
spek_version = '1.1.5'
mockk_version = '1.10.0'
}
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url = 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0'
classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC9.2"
}
}
subprojects {
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'maven'
apply plugin: 'io.gitlab.arturbosch.detekt'
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
configurations {
ktlint
}
dependencies {
ktlint "com.github.shyiko:ktlint:0.31.0"
}
task ktlint(type: JavaExec, group: "verification") {
description = "Check Kotlin code style."
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "src/**/*.kt"
}
check.dependsOn ktlint
task ktlintFormat(type: JavaExec, group: "formatting") {
description = "Fix Kotlin code style deviations."
main = "com.github.shyiko.ktlint.Main"
classpath = configurations.ktlint
args "-F", "src/**/*.kt"
}
detekt {
input = files("src/main/kotlin")
filters = ".*/resources/.*,.*/build/.*"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
version = rootProject.ext.kalexa_version
group = 'com.hp.kalexa'
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = project.name
pom {
description = 'The Kalexa SDK is a very simple library that makes easier for developers to work with Amazon Alexa Skill using Kotlin Language.'
name = project.name
url = 'https://github.com/HPInc/kalexa-sdk'
organization {
name = 'HP Development Company, L.P.'
url = 'https://github.com/HPInc'
}
issueManagement {
system = 'GitHub'
url = 'https://github.com/HPInc/kalexa-sdk/issues'
}
licenses {
license {
name = 'MIT'
url = 'https://github.com/HPInc/kalexa-sdk/blob/master/LICENSE.md'
distribution = 'repo'
}
}
scm {
url = 'https://github.com/HPInc/kalexa-sdk'
connection = 'scm:git:git://github.com/HPInc/kalexa-sdk.git'
developerConnection = 'scm:git:ssh://[email protected]:HPInc/kalexa-sdk.git'
}
developers {
developer {
name = 'Marcelo Correa'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
credentials {
username = sonatypeUsername
password = sonatypePassword
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
}