-
Notifications
You must be signed in to change notification settings - Fork 57
/
build.gradle
69 lines (58 loc) · 1.7 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
buildscript {
ext.kotlin_version = '1.1.2'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id "org.jetbrains.intellij" version "0.1.10"
}
apply plugin: 'org.jetbrains.intellij'
apply plugin: 'kotlin'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
ext {
versionFile = project.file("VERSION")
versionName = versionFile.readLines()[0].trim()
}
intellij {
version '2016.1.3'
plugins = ['Kotlin', 'Groovy']
pluginName 'PermissionsDispatcher plugin'
alternativeIdePath '/Applications/Android Studio.app'
updateSinceUntilBuild = false
sameSinceUntilBuild = false
publish {
username 'shiraji'
password System.getenv('PASSWORD')
pluginId '8349'
}
}
group 'com.github.shiraji.permissionsdispatcherplugin'
version versionName
repositories {
mavenCentral()
}
dependencies {
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
task prepareForNextDevelopment << {
def versionParts = versionName.split(/\./)
versionParts[2] = (versionParts[2] as int) + 1
def newVersion = "${versionParts[0]}.${versionParts[1]}.${versionParts[2]}-SNAPSHOT"
versionFile.write(newVersion + "\n")
}
task prepareForRelease << {
def versionParts = versionName.split(/\./)
versionParts[2] = versionParts[2].split(/-/)[0]
def newVersion = "${versionParts[0]}.${versionParts[1]}.${versionParts[2]}"
versionFile.write(newVersion + "\n")
new File("$projectDir/.travis/release").createNewFile()
}