-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
109 lines (92 loc) · 2.77 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
buildscript {
ext.compose_version = '0.1.0-dev14'
ext.kotlin_version = '1.4.0-rc'
ext.dokka_version = '0.10.1'
ext.gradle_bintray_plugin_version = "1.8.0"
ext.android_maven_gradle_plugin_version = 2.1
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.android.tools.build:gradle:4.2.0-alpha07'
classpath "androidx.benchmark:benchmark-gradle-plugin:1.0.0"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:${gradle_bintray_plugin_version}"
classpath "com.github.dcendents:android-maven-gradle-plugin:${android_maven_gradle_plugin_version}"
}
}
plugins {
id 'org.jetbrains.kotlin.jvm' version "${kotlin_version}"
id "com.diffplug.gradle.spotless" version "4.5.1"
id 'org.jetbrains.dokka' version "${dokka_version}"
}
apply plugin: 'antlr'
group 'org.pinelang'
version '1.0-SNAPSHOT'
ext.forceReleaseBuild = project.hasProperty('forceReleaseBuild')
ext.isRelease = { forceReleaseBuild ||
['uploadArchives', 'bintrayUpload'].any { gradle.startParameter.taskNames.contains(it) } }
ext.isSnapshot = { VERSION_NAME.endsWith('-SNAPSHOT') }
dokka {
subProjects = [':pinelangandroid', 'core', 'lsp', ':android']
if (project.file('Module.md').exists()) {
includes = ['Module.md']
}
}
allprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
freeCompilerArgs += [
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
"-XXLanguage:+InlineClasses",
"-Xopt-in=kotlin.RequiresOptIn"
]
}
}
kotlin {
experimental {
coroutines "enable"
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
}
apply plugin: "com.diffplug.gradle.spotless"
apply plugin: "org.jetbrains.dokka"
spotless {
// optional: limit format enforcement to just the files changed by this feature branch
//ratchetFrom 'origin/main'
enforceCheck false
format 'misc', {
// define the files to apply `misc` to
target '*.gradle', '*.md', '.gitignore'
// define the steps to apply to those files
trimTrailingWhitespace()
indentWithTabs() // or spaces. Takes an integer argument if you don't like 4
endWithNewline()
}
kotlin {
// by default the target is every '.kt' and '.kts` file in the java sourcesets
ktlint() // has its own section below
//ktfmt('0.15') // has its own section below
//prettier() // has its own section below
licenseHeaderFile "${rootProject.projectDir}/.license_header", '(package)'
}
}
repositories {
google()
mavenLocal()
mavenCentral()
jcenter()
}
}