-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
146 lines (121 loc) · 4.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
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'com.diffplug.spotless'
apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'
group = 'video.api'
version = '1.6.7'
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.diffplug.spotless:spotless-plugin-gradle:5.17.1'
classpath 'com.android.tools.build:gradle:8.2.2'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.22'
classpath 'de.mannodermaus.gradle.plugins:android-junit5:1.8.2.1'
}
}
allprojects {
repositories {
mavenCentral()
google()
}
}
if(hasProperty('target') && target == 'android') {
apply plugin: 'com.android.library'
apply plugin: 'de.mannodermaus.android-junit5'
apply from: 'maven-push.gradle'
android {
compileSdk 34
defaultConfig {
minSdk 21
targetSdk 34
multiDexEnabled true
consumerProguardFiles 'consumer-rules.pro'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArgument("runnerBuilder", "de.mannodermaus.junit5.AndroidJUnit5Builder")
testInstrumentationRunnerArgument("environmentVariables", "INTEGRATION_TESTS_API_KEY=${System.getenv("INTEGRATION_TESTS_API_KEY")}")
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
namespace "video.api.client.api"
}
} else {
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
publishing {
publications {
maven(MavenPublication) {
artifactId = 'android-api-client'
from components.java
}
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
javadoc {
options.tags = [ "http.response.details:a:Http Response Details" ]
}
sourceSets {
main.java.srcDirs = ['src/main/java']
}
}
dependencies {
implementation 'io.swagger:swagger-annotations:1.5.24'
implementation "com.google.code.findbugs:jsr305:3.0.2"
api 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'io.gsonfire:gson-fire:1.9.0'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10'
implementation 'org.threeten:threetenbp:1.6.8'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.work:work-runtime-ktx:2.9.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.7.0'
testImplementation 'org.assertj:assertj-core:3.19.0'
testImplementation "com.google.truth:truth:1.4.0"
androidTestImplementation "com.google.truth:truth:1.4.0"
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test:rules:1.5.0'
androidTestImplementation 'androidx.test:core:1.5.0'
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
androidTestImplementation 'de.mannodermaus.junit5:android-test-core:1.4.0'
androidTestRuntimeOnly 'de.mannodermaus.junit5:android-test-runner:1.4.0'
}
// Use spotless plugin to automatically format code, remove unused import, etc
// To apply changes directly to the file, run `gradlew spotlessApply`
// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle
spotless {
// comment out below to run spotless as part of the `check` task
enforceCheck false
format 'misc', {
// define the files (e.g. '*.gradle', '*.md') to apply `misc` to
target '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithSpaces() // Takes an integer argument if you don't like 4
endWithNewline()
}
java {
// don't need to set target, it is inferred from java
// apply a specific flavor of google-java-format
googleJavaFormat('1.8').aosp().reflowLongStrings()
removeUnusedImports()
importOrder()
}
}