Skip to content

Commit 6e1d80f

Browse files
authored
Merge pull request #1136 from PhilipRoman/gradle-build-fix
Gradle build update
2 parents d0f5731 + a25bce4 commit 6e1d80f

File tree

1 file changed

+27
-28
lines changed

1 file changed

+27
-28
lines changed

build.gradle

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
apply plugin: 'java'
2-
apply plugin: 'idea'
3-
apply plugin: 'maven'
4-
1+
plugins {
2+
id 'java'
3+
id 'idea'
4+
id 'maven-publish'
5+
}
56

67
repositories {
78
mavenLocal()
@@ -10,34 +11,32 @@ repositories {
1011

1112
group = 'org.java-websocket'
1213
version = '1.5.2-SNAPSHOT'
13-
sourceCompatibility = 1.6
14-
targetCompatibility = 1.6
14+
sourceCompatibility = 1.7
15+
targetCompatibility = 1.7
1516

16-
configurations {
17-
deployerJars
17+
compileJava {
18+
options.compilerArgs += ['-encoding', 'UTF-8']
1819
}
1920

20-
configure(install.repositories.mavenInstaller) {
21-
pom.version = project.version
22-
pom.groupId = "org.java-websocket"
23-
pom.artifactId = 'Java-WebSocket'
21+
javadoc {
22+
options.encoding = 'UTF-8'
2423
}
2524

26-
dependencies {
27-
deployerJars "org.apache.maven.wagon:wagon-webdav:1.0-beta-2"
28-
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
29-
testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
30-
testCompile group: 'junit', name: 'junit', version: '4.12'
31-
testCompile group: 'org.json', name: 'json', version: '20180813'
32-
}
25+
publishing {
26+
publications {
27+
maven(MavenPublication) {
28+
groupId = project.group
29+
artifactId = 'Java-WebSocket'
30+
version = project.version
3331

32+
from components.java
33+
}
34+
}
35+
}
3436

35-
//deploy to maven repository
36-
//uploadArchives {
37-
// repositories.mavenDeployer {
38-
// configuration = configurations.deployerJars
39-
// repository(url: repositoryUrl) {
40-
// authentication(userName: repositoryUsername, password: repositoryPassword)
41-
// }
42-
// }
43-
//}
37+
dependencies {
38+
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
39+
testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
40+
testImplementation group: 'junit', name: 'junit', version: '4.12'
41+
testImplementation group: 'org.json', name: 'json', version: '20180813'
42+
}

0 commit comments

Comments
 (0)