forked from socketio/engine.io-client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
83 lines (69 loc) · 2.07 KB
/
build.gradle
File metadata and controls
83 lines (69 loc) · 2.07 KB
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
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenLocal()
maven {
url = uri('https://oss.sonatype.org/content/repositories/snapshots')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
dependencies {
api "com.squareup.okhttp3:okhttp:3.12.12"
implementation 'org.json:json:20090211'
testImplementation 'junit:junit:4.12'
testImplementation 'org.hamcrest:hamcrest-library:1.3'
}
java.sourceCompatibility = JavaVersion.VERSION_1_7
java {
withSourcesJar()
withJavadocJar()
}
def projectGroup = "com.kaleyra"
def libVersion = "2.0.0"
Properties properties = new Properties()
if (project.rootProject.file("local.properties").exists()) {
properties.load(project.rootProject.file('local.properties').newDataInputStream())
}
publishing {
repositories {
maven {
url = "s3://maven-bandyer/releases/"
credentials(AwsCredentials) {
accessKey = properties.getProperty("maven.accessKey")
secretKey = properties.getProperty("maven.secretKey")
}
}
}
publications {
maven(MavenPublication) {
from components.java
groupId = projectGroup
artifactId = project.getName()
version = libVersion
}
}
}
task invalidateCache(type: Exec) {
workingDir 'scripts'
def publishPath = "releases"
def packageName = projectGroup + "." + project.getName()
commandLine 'python3', './invalidate_s3_cache.py', properties.getProperty("maven.accessKey"), properties.getProperty("maven.secretKey"), properties.getProperty("maven.distributionId"), publishPath, packageName ,libVersion
}
task publishUpload {
def dryRun = true
def publishTask = 'publishToMavenLocal'
if(!dryRun) publishTask = 'publish'
dependsOn publishTask
dependsOn 'invalidateCache'
tasks.findByName('invalidateCache').mustRunAfter publishTask
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}