1buildscript {
2 repositories {
3 maven {
4 url 'http://localhost:8081/artifactory/plugins-release'
5 credentials {
6 username = "${artifactory_user}"
7 password = "${artifactory_password}"
8 }
9 name = "maven-main-cache"
10 }
11 }
12 dependencies {
13 classpath "org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1"
14 }
15}
16
17apply plugin: 'scala'
18apply plugin: 'maven-publish'
19apply plugin: "com.jfrog.artifactory"
20
21version = '1.0.0-SNAPSHOT'
22group = 'com.buransky'
23
24repositories {
25 add buildscript.repositories.getByName("maven-main-cache")
26}
27
28dependencies {
29 compile 'org.scala-lang:scala-library:2.11.2'
30}
31
32tasks.withType(ScalaCompile) {
33 scalaCompileOptions.useAnt = false
34}
35
36artifactory {
37 contextUrl = "${artifactory_contextUrl}"
38 publish {
39 repository {
40 repoKey = 'libs-snapshot-local'
41 username = "${artifactory_user}"
42 password = "${artifactory_password}"
43 maven = true
44
45 }
46 defaults {
47 publications ('mavenJava')
48 }
49 }
50}
51
52publishing {
53 publications {
54 mavenJava(MavenPublication) {
55 from components.java
56 }
57 }
58}
59