File tree Expand file tree Collapse file tree 3 files changed +29
-19
lines changed
Expand file tree Collapse file tree 3 files changed +29
-19
lines changed Original file line number Diff line number Diff line change @@ -56,11 +56,28 @@ if (JavaVersion.current().isJava8Compatible()) {
5656}
5757
5858project(" :gdx-ai" ) {
59- apply from : ' ../publish.gradle'
59+ version project. getProperty(' version' ) + (isReleaseBuild() ? " " : " -SNAPSHOT" )
60+
61+ java {
62+ withJavadocJar()
63+ withSourcesJar()
64+ }
65+
66+ tasks. withType(JavaCompile ). configureEach {
67+ options. encoding = ' UTF-8'
68+ }
69+
70+ tasks. withType(Test ). configureEach {
71+ systemProperty ' file.encoding' , ' UTF-8'
72+ }
73+
6074
6175 dependencies {
6276 api " com.badlogicgames.gdx:gdx:$gdxVersion "
6377 }
78+
79+ apply from : ' ../publish.gradle'
80+
6481}
6582
6683project(" :tests" ) {
Original file line number Diff line number Diff line change 1- apply plugin : " java"
21
32sourceCompatibility = 1.7
43
@@ -9,7 +8,7 @@ sourceSets {
98 }
109
1110 resources {
12- srcDirs = [ " src/" ]
11+ srcDirs = [ " src/**.*xml " ]
1312 }
1413 }
1514
Original file line number Diff line number Diff line change @@ -5,7 +5,16 @@ apply plugin: 'signing'
55afterEvaluate { project ->
66 publishing {
77 publications {
8- withType(MavenPublication ) {
8+ mavenJava(MavenPublication ) {
9+ from components. java
10+ versionMapping {
11+ usage(' java-api' ) {
12+ fromResolutionOf(' runtimeClasspath' )
13+ }
14+ usage(' java-runtime' ) {
15+ fromResolutionResult()
16+ }
17+ }
918 pom {
1019 name = POM_NAME
1120 description = POM_DESCRIPTION
@@ -30,21 +39,6 @@ afterEvaluate { project ->
3039 }
3140 }
3241 }
33- // Check if we are a gradle plugin, if we are skip mavenJava
34- if (! plugins. hasPlugin(' java-gradle-plugin' )) {
35- mavenJava(MavenPublication ) {
36-
37- from components. java
38- versionMapping {
39- usage(' java-api' ) {
40- fromResolutionOf(' runtimeClasspath' )
41- }
42- usage(' java-runtime' ) {
43- fromResolutionResult()
44- }
45- }
46- }
47- }
4842 }
4943
5044 repositories {
You can’t perform that action at this time.
0 commit comments