@@ -15,40 +15,26 @@ plugins {
15
15
id ' maven'
16
16
}
17
17
18
- apply plugin : " java-library "
19
- apply plugin : " com.diffplug.gradle.spotless "
20
- apply plugin : ' org.junit.platform. gradle.plugin '
18
+ allprojects {
19
+ apply plugin : " java-library "
20
+ apply plugin : " com.diffplug. gradle.spotless "
21
21
22
- group ' com.microsoft.signalr'
22
+ // If we're run from outside MSBuild, just assign a bogus dev version.
23
+ version project. findProperty(' packageVersion' ) ?: " 99.99.99-dev"
23
24
24
- // If we're run from outside MSBuild, just assign a bogus dev version.
25
- version project. findProperty(' packageVersion' ) ?: " 99.99.99-dev"
25
+ sourceCompatibility = 1.8
26
26
27
- sourceCompatibility = 1.8
28
-
29
- repositories {
30
- mavenCentral()
31
- }
32
-
33
- dependencies {
34
- testImplementation ' org.junit.jupiter:junit-jupiter-api:5.3.1'
35
- testCompile ' org.junit.jupiter:junit-jupiter-params:5.3.1'
36
- testRuntime ' org.junit.jupiter:junit-jupiter-engine:5.3.1'
37
- testCompile ' org.slf4j:slf4j-jdk14:1.7.25'
38
- implementation ' com.google.code.gson:gson:2.8.5'
39
- implementation ' com.squareup.okhttp3:okhttp:3.11.0'
40
- api ' io.reactivex.rxjava2:rxjava:2.2.3'
41
- implementation ' org.slf4j:slf4j-api:1.7.25'
42
- compile ' org.msgpack:msgpack-core:0.8.20'
43
- compile ' org.msgpack:jackson-dataformat-msgpack:0.8.20'
27
+ repositories {
28
+ mavenCentral()
29
+ }
44
30
}
45
31
46
32
spotless {
47
33
java {
48
34
licenseHeader ' // Copyright (c) .NET Foundation. All rights reserved.\n ' +
49
35
' // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.\n\n ' // License header
50
36
51
- importOrder ' java' , ' javax' , ' org' , ' com' , ' com.diffplug' , ' ' // A sequence of package names
37
+ importOrder ' java' , ' javax' , ' org' , ' com' , ' com.diffplug' , ' ' // A sequence of package names
52
38
53
39
replace ' Not enough space after if' , ' if(' , ' if ('
54
40
replace ' Not enough space after else' , ' else{' , ' else {'
@@ -66,73 +52,4 @@ spotless {
66
52
indentWithSpaces(4 )
67
53
removeUnusedImports() // removes any unused imports
68
54
}
69
- }
70
-
71
- junitPlatform {
72
- reportsDir file(' test-results' )
73
- }
74
-
75
- task sourceJar (type : Jar ) {
76
- classifier " sources"
77
- from sourceSets. main. allJava
78
- }
79
-
80
- task javadocJar (type : Jar , dependsOn : javadoc) {
81
- classifier " javadoc"
82
- from javadoc. destinationDir
83
- }
84
-
85
- task generatePOM {
86
- pom {
87
- project {
88
- inceptionYear ' 2018'
89
- description ' ASP.NET Core SignalR Client for Java applications'
90
- url ' https://github.com/dotnet/aspnetcore'
91
- name groupId + ' :' + artifactId
92
- licenses {
93
- license {
94
- name ' The Apache Software License, Version 2.0'
95
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
96
- distribution ' repo'
97
- }
98
- }
99
- scm {
100
- connection ' scm:git:git://github.com/dotnet/aspnetcore.git'
101
- developerConnection ' scm:git:git://github.com/dotnet/aspnetcore.git'
102
- url ' http://github.com/dotnet/aspnetcore/tree/master'
103
- }
104
- developers {
105
- developer {
106
- id ' microsoft'
107
- name ' Microsoft'
108
- }
109
- }
110
- }
111
- }. writeTo(" ${ buildDir} /libs/signalr-${ project.version} .pom" )
112
- }
113
-
114
- task createPackage (dependsOn : [jar,sourceJar,javadocJar,generatePOM])
115
-
116
- task generateVersionClass {
117
- inputs. property " version" , project. version
118
- outputs. dir " $buildDir /generated"
119
- doFirst {
120
- def versionFile = file(" $buildDir /../src/main/java/com/microsoft/signalr/Version.java" )
121
- versionFile. parentFile. mkdirs()
122
- versionFile. text =
123
- """
124
- // Copyright (c) .NET Foundation. All rights reserved.
125
- // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
126
-
127
- package com.microsoft.signalr;
128
-
129
- class Version {
130
- public static String getDetailedVersion() {
131
- return "$project . version ";
132
- }
133
- }
134
- """
135
- }
136
- }
137
-
138
- compileJava. dependsOn generateVersionClass
55
+ }
0 commit comments