Skip to content

Commit a1ddd4a

Browse files
dev content review comments fixed (#14)
* dev content review comments fixed Signed-off-by: Arun Venmany <[email protected]> * dev content review comments fixed Signed-off-by: Arun Venmany <[email protected]> * dev content review comments fixed Signed-off-by: Arun Venmany <[email protected]> * dev content review Signed-off-by: Gilbert Kwan <[email protected]> --------- Signed-off-by: Arun Venmany <[email protected]> Signed-off-by: Gilbert Kwan <[email protected]> Co-authored-by: Gilbert Kwan <[email protected]>
1 parent b4845ca commit a1ddd4a

File tree

8 files changed

+19
-27
lines changed

8 files changed

+19
-27
lines changed

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
:projectid: gradle-multimodules
99
:page-layout: guide-multipane
1010
:page-duration: 30 minutes
11-
:page-releasedate: 2025-01-29
11+
:page-releasedate: 2025-03-29
1212
:page-description: Learn how to build an application consisting of JAR, WAR, and EAR modules with Gradle
1313
:page-related-guides: ['gradle-intro']
1414
:page-seo-title: Building a multi-module enterprise Java application with Gradle and Open Liberty
@@ -199,7 +199,7 @@ start/build.gradle
199199
include::finish/build.gradle[]
200200
----
201201

202-
Set the [hotspot=packaging file=1]`basic configuration` for the project. Apply [gradle-java-plugin file=1]`gradle-java-plugin` to all sub projects. This allows each child module to inherit the plug-ins, so that you can use the these to develop the modules.
202+
Set the [hotspot=allprojects file=1]`basic configuration` for the project. Apply [hotspot=java file=1]`java` plugin and its [hotspot=options file=1]`options` to all sub-projects. The plugins and dependencies will be downloaded from the repositories that are specified in the [hotspot=repositories file=1]`repositories` configuration. Each child module inherits all the configurations.
203203

204204

205205

finish/build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1+
// tag::allprojects[]
12
allprojects {
23
group = 'io.openliberty.guides'
34
version = '1.0-SNAPSHOT'
45
}
6+
// end::allprojects[]
57

68
subprojects {
9+
// tag::java[]
710
apply plugin: 'java'
11+
// end::java[]
812

9-
sourceCompatibility = JavaVersion.VERSION_11
10-
targetCompatibility = JavaVersion.VERSION_11
13+
// tag::options[]
14+
java {
15+
sourceCompatibility = JavaVersion.VERSION_11
16+
targetCompatibility = JavaVersion.VERSION_11
17+
}
1118

1219
tasks.withType(JavaCompile).configureEach {
1320
options.encoding = 'UTF-8'
1421
options.release.set(11)
1522
}
23+
// end::options[]
1624

25+
// tag::repositories[]
1726
repositories {
1827
mavenLocal()
1928
mavenCentral()
2029
}
30+
// end::repositories[]
2131
}

finish/ear/build.gradle

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ buildscript {
2121
}
2222
}
2323

24-
repositories {
25-
mavenLocal()
26-
mavenCentral()
27-
}
2824

2925
dependencies {
3026
// tag::war[]

finish/jar/build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ tasks.withType(JavaCompile).configureEach {
66
options.encoding = 'UTF-8'
77
}
88

9-
repositories {
10-
mavenLocal()
11-
mavenCentral()
12-
}
13-
149
dependencies {
1510
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
1611
}

start/build.gradle

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ allprojects {
66
subprojects {
77
apply plugin: 'java'
88

9-
sourceCompatibility = JavaVersion.VERSION_11
10-
targetCompatibility = JavaVersion.VERSION_11
9+
java {
10+
sourceCompatibility = JavaVersion.VERSION_11
11+
targetCompatibility = JavaVersion.VERSION_11
12+
}
1113

1214
tasks.withType(JavaCompile).configureEach {
1315
options.encoding = 'UTF-8'

start/ear/build.gradle

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ buildscript {
1414
}
1515
}
1616

17-
repositories {
18-
mavenLocal()
19-
mavenCentral()
20-
}
21-
2217
dependencies {
2318
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
2419
}

start/jar/build.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@ description = 'JAR Module'
55
tasks.withType(JavaCompile).configureEach {
66
options.encoding = 'UTF-8'
77
}
8-
9-
repositories {
10-
mavenLocal()
11-
mavenCentral()
12-
}
13-
148
dependencies {
159
testImplementation 'org.junit.jupiter:junit-jupiter:5.11.4'
1610
}

start/settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = 'guide-gradle-multimodules'
1+
rootProject.name = 'guide-gradle-multimodules'

0 commit comments

Comments
 (0)