This repository has been archived by the owner on Aug 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 433
/
build.gradle
56 lines (50 loc) · 1.54 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
buildscript {
ext.kotlinVersion = '1.1.0-dev-372'
repositories {
maven {
url 'https://repo.gradle.org/gradle/repo'
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.1.1'
}
}
apply from: 'build.gradle.kts'
// --- classpath.properties --------------------------------------------
File generatedResourcesDir = file("$buildDir/generate-resources/main")
task generateClasspathManifest(type: codegen.GenerateClasspathManifest) {
outputDirectory = generatedResourcesDir
}
sourceSets {
main.output.dir generatedResourcesDir, builtBy: generateClasspathManifest
}
// --- Configure publications ------------------------------------------
def buildTagFor(String version) {
switch (version.substring(version.lastIndexOf('-') + 1)) {
case 'SNAPSHOT':
return 'snapshot'
case ~/M\d+[a-z]*$/:
return 'milestone'
default:
return 'release'
}
}
def targetRepoKey = "libs-${buildTagFor(project.version)}s-local"
artifactory {
contextUrl = "https://repo.gradle.org/gradle"
publish {
repository {
repoKey = targetRepoKey
username = project.findProperty("artifactory_user") ?: "nouser"
password = project.findProperty("artifactory_password") ?: "nopass"
maven = true
}
defaults {
publications('mavenJava')
}
}
resolve {
repoKey = 'repo'
}
}