/
build.gradle
55 lines (50 loc) · 2.09 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.11'
//gradleVersion
ext.gradle_version='3.2.1'
//kotlinVersions
//retrolambdaVersion
//ext.retrolambda=''
repositories {
google()
jcenter()
mavenCentral()
//解决Android Studio配置完Kotlin下载慢的问题 加入下面这句
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
dependencies {
classpath "com.android.tools.build:gradle:$gradle_version"
// if the Android Studio version is not 3.0, we need to add the following code into the build.gradle
// (Project: MyApplication) file
// (located at the bottom of the left side of the Project window, inside Gradle Scripts), under the dependencies section.
// classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version”
// classpath “org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version”
// Also add the Kotlin version into the buildscript section, as follows:
// ext.kotlin_version = ‘1.1.x’
// Now, add the following line to the build.gradle (Module: app) file, as the second line,
// followed by the com.android.application plugin:
// apply plugin: ‘kotlin-android’
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
//Remove the below dependency line :
//classpath "me.tatarka:gradle-retrolambda:"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
//解决Android Studio配置完Kotlin下载慢的问题 加入下面这句
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
task javadoc(type: Javadoc) {
options.encoding = "utf-8"
}