forked from oliviergauthier/gradle-appcenter-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
138 lines (110 loc) · 3.16 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
buildscript {
repositories {
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.9.7"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'java-gradle-plugin'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
group 'com.betomorrow.gradle'
version '1.1.0'
repositories {
mavenCentral()
jcenter()
google()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
compileOnly gradleApi()
// Third Party
compileOnly 'com.android.tools.build:gradle:3.3.0'
compile 'com.squareup.okhttp3:okhttp:3.12.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
compile 'com.squareup.retrofit2:converter-gson:2.5.0'
compile 'com.squareup.retrofit2:retrofit:2.5.0'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testCompile 'org.assertj:assertj-core:3.11.1'
testCompile gradleTestKit()
testRuntime "cglib:cglib-nodep:3.2.4" // allows mocking of classes (in addition to interfaces)
testRuntime "org.objenesis:objenesis:2.4" // allows mocking of classes without default constructor (together with CGLIB)
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
test {
useJUnitPlatform {}
}
/**
* Integration test
*/
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/kotlin')
}
resources.srcDir file('src/integration-test/resources')
}
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: Test, group: "verification") {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
}
check.dependsOn integrationTest
gradlePlugin {
testSourceSets sourceSets.integrationTest
}
/**
* Publishing
*/
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}
publishing {
publications {
BintrayPublication(MavenPublication) {
from components.java
artifact sourceJar
}
}
}
wrapper {
gradleVersion = "5.1"
distributionType = Wrapper.DistributionType.ALL
}
pluginBundle {
website = 'https://github.com/oliviergauthier/gradle-appcenter-plugin'
vcsUrl = 'https://github.com/oliviergauthier/gradle-appcenter-plugin'
tags = ['android', 'appcenter', 'plugin', 'tool']
plugins {
libraryPlugin {
id = 'com.betomorrow.appcenter'
displayName = 'Gradle AppCenter Plugin'
description = 'Plugin to upload apk to AppCenter'
}
}
}