-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.gradle
executable file
·151 lines (122 loc) · 3.91 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
buildscript {
ext {
kotlinVersion= '1.5.30'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.gradle.publish:plugin-publish-plugin:0.14.0"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}"
}
apply plugin: "com.gradle.plugin-publish"
apply plugin: 'java-gradle-plugin'
apply plugin: 'kotlin'
apply plugin: 'maven-publish'
group 'gradle.plugin.com.betomorrow.gradle'
version '2.0.4'
repositories {
mavenCentral()
google()
}
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
integrationTestImplementation.extendsFrom testImplementation
integrationTestRuntimeOnly.extendsFrom testRuntimeOnly
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin') {
details.useVersion "${kotlinVersion}"
}
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion}"
implementation "org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}"
compileOnly gradleApi()
// Third Party
implementation 'com.android.tools.build:gradle:4.1.3'
implementation 'com.squareup.okhttp3:okhttp:4.9.1'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.1'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
// Testing
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testRuntimeOnly'org.junit.jupiter:junit-jupiter-engine:5.3.1'
testImplementation 'org.assertj:assertj-core:3.19.0'
testImplementation gradleTestKit()
testRuntimeOnly "cglib:cglib-nodep:3.3.0" // allows mocking of classes (in addition to interfaces)
testRuntimeOnly "org.objenesis:objenesis:3.2" // 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 {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
java.srcDir file("./src/integration-test/kotlin")
resources.srcDir file("./src/integration-test/resources")
}
}
task integrationTest(type: Test, group: "verification") {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
outputs.upToDateWhen { false }
mustRunAfter test
useJUnitPlatform()
}
// check.dependsOn integrationTest
gradlePlugin {
testSourceSets sourceSets.integrationTest
plugins {
appCenterPlugin {
id = 'com.betomorrow.appcenter'
implementationClass = 'com.betomorrow.gradle.appcenter.AppCenterPlugin'
}
}
}
/**
* Publishing
*/
task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
}
wrapper {
gradleVersion = "7.2"
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 {
appCenterPlugin {
id = 'com.betomorrow.appcenter'
displayName = 'Gradle AppCenter Plugin'
description = 'Plugin to upload apk to AppCenter'
}
}
}