This repository has been archived by the owner on Apr 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
149 lines (129 loc) · 5.11 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'
apply plugin: 'org.jetbrains.dokka'
buildscript {
ext {
dokka_version = "1.6.0"
kotlin_version = '1.3.61'
}
repositories {
mavenCentral()
gradlePluginPortal()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath("org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}")
}
}
android {
compileSdkVersion 31
buildToolsVersion "30.0.2"
defaultConfig {
minSdkVersion 20
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
repositories {
// artifacts are published to this repository
mavenCentral()
gradlePluginPortal()
google()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.10.0"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
implementation 'androidx.test:core-ktx:1.4.0'
testImplementation 'junit:junit:4.13.2'
testImplementation "com.nhaarman:mockito-kotlin:1.5.0"
testImplementation 'org.mockito:mockito-inline:3.11.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation("com.squareup.okhttp3:okhttp:4.8.1")
testImplementation("com.squareup.okhttp3:okhttp:4.8.1")
testImplementation 'com.squareup.okhttp3:mockwebserver:4.8.1'
implementation 'com.google.code.gson:gson:2.8.6'
testImplementation 'org.yaml:snakeyaml:1.17'
testImplementation 'org.skyscreamer:jsonassert:1.5.0'
testImplementation 'org.robolectric:robolectric:4.5.1'
testImplementation "org.jetbrains.kotlin:kotlin-test"
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
def lifecycle_version = "1.1.1"
testImplementation "android.arch.core:core-testing:$lifecycle_version"
def coroutines_version = '1.3.9' //Kotlin coroutines用ライブラリ(async, await)のバージョン
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" //Kotlin coroutines用ライブラリ(async, await)
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" //Kotlin coroutines用ライブラリ(async, await)
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:28.1.0')
// Declare the dependency for the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-messaging-ktx'
// Use the Kotlin test library.
testImplementation "org.jetbrains.kotlin:kotlin-test"
// Use the Kotlin JUnit integration.
testImplementation "org.jetbrains.kotlin:kotlin-test-junit"
}
task clearJar(type: Delete) {
delete 'release/' + JAR_NAME
}
task makeJar(type: Copy) {
from('build/intermediates/aar_main_jar/release')
into('release/')
include('classes.jar')
rename('classes.jar', JAR_NAME)
}
makeJar.dependsOn(clearJar, build)
dokkaHtml.configure{
outputDirectory.set(new File("${projectDir}/docs/"))
dokkaSourceSets{
named("main"){
moduleName.set("ncmb_kotlin")
includes.from("Module.md")
supress.set(true)
noJdkLink.set(false)
noAndroidSdkLink.set(false)
includeNonPublic.set(false)
sourceLink {
localDirectory.set(file("src/main/java/com/nifcloud/mbaas"))
remoteUrl.set(URL("https://github.com/NIFCLOUD-mbaas/ncmb_kotlin"))
remoteLineSuffix.set("#L")
}
}
}
}