-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
100 lines (86 loc) · 2.44 KB
/
Copy pathbuild.gradle
File metadata and controls
100 lines (86 loc) · 2.44 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
buildscript {
repositories {
mavenLocal()
mavenCentral()
google()
}
dependencies {
}
}
plugins {
}
allprojects {
if( gradle.ext.mvncentralRepoCreds.'signing.keyId' != null )
{
ext.'signing.keyId' = gradle.ext.mvncentralRepoCreds.'signing.keyId'
ext.'signing.password' = gradle.ext.mvncentralRepoCreds.'signing.password'
ext.'signing.secretKeyRingFile' = java.nio.file.Paths.get( "$gradle.ext.userHome" ).resolve( gradle.ext.mvncentralRepoCreds.'signing.secretKeyRingFile' ).toAbsolutePath().toString()
}
apply plugin: 'signing'
apply plugin: 'maven-publish'
tasks.withType( JavaCompile ) {
configure( options ) {
options.encoding = 'UTF-8'
options.debug = true
options.failOnError = true
options.warnings = true
options.compilerArgs.addAll( ['-g', '-parameters'] )
//[compileJava, compileTestJava]*.options*.compilerArgs = ['-g', '-parameters']
}
tasks.withType( Javadoc ) {
options.addStringOption( 'Xdoclint:none', '-quiet' )
}
}
if( ext.has( 'signing.keyId' ) )
{
signing {
sign configurations.archives
sign publishing.publications
}
}
publishing {
repositories {
maven {
name 'BackendlessPublic'
url 'https://maven.backendless.com/repository/backendless_public/'
credentials {
username gradle.ext.backendlessRepoCreds.username
password gradle.ext.backendlessRepoCreds.password
}
authentication {
basic( BasicAuthentication )
}
}
maven {
name = 'MavenCentral'
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username gradle.ext.mvncentralRepoCreds."user.name"
password gradle.ext.mvncentralRepoCreds."user.password"
}
authentication {
basic( BasicAuthentication )
}
}
maven {
name = 'MavenCentralSnapshot'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
credentials {
username gradle.ext.mvncentralRepoCreds."user.name"
password gradle.ext.mvncentralRepoCreds."user.password"
}
authentication {
basic( BasicAuthentication )
}
}
}
}
}
tasks.register( 'copyJarToOut' ) {
doLast {
copy( () -> from "$projectDir.path/gradle.properties" into "$projectDir.path/out" )
}
}
clean {
delete( "$projectDir.path/out" )
}