forked from jaredsburrows/gradle-license-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
84 lines (70 loc) · 2.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
plugins {
id 'com.jfrog.artifactory' version '4.13.0'
id 'com.jfrog.bintray' version '1.8.4'
id 'com.github.ben-manes.versions' version '0.28.0'
id 'com.gradle.plugin-publish' version '0.10.1'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'org.jetbrains.dokka' version '0.10.1'
id 'org.jlleitschuh.gradle.ktlint' version '9.2.1'
id 'java-gradle-plugin'
id 'groovy'
id 'maven-publish'
}
repositories {
jcenter()
google()
}
apply from: 'gradle/dependencies.gradle'
group = GROUP
version = VERSION_NAME
description = POM_DESCRIPTION
sourceCompatibility = versions.java
targetCompatibility = versions.java
jar {
manifest {
attributes(
'Implementation-Title': POM_NAME,
'Implementation-Version': archiveVersion,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion)
}
}
task createClasspathManifest() {
def outputDir = file("$buildDir/$name")
inputs.files sourceSets.main.runtimeClasspath
outputs.dir outputDir
doLast {
outputDir.mkdirs()
// Combine both main and test plugin classpaths
file("$outputDir/plugin-classpath.txt").text = sourceSets.main.runtimeClasspath.join('\n') + '\n' + sourceSets.test.runtimeClasspath.join('\n')
}
}
configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'org.jetbrains.kotlin') {
details.useVersion versions.kotlin
}
}
}
}
dependencies {
implementation localGroovy()
implementation deps.kotlin.stdlib.jdk
implementation deps.kotlinx.html
implementation deps.gson
implementation deps.android.tools.build.gradle
testRuntimeOnly files(createClasspathManifest)
testImplementation localGroovy()
testImplementation deps.spock, { exclude module: 'groovy-all' } // Use localGroovy()
testImplementation deps.xmlunit.matchers
}
apply from: 'gradle/compile.gradle'
apply from: 'gradle/publish.gradle'
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = rootProject.versions.java
}
}