Skip to content

Commit c7cb831

Browse files
committed
fix gradle setup
1 parent d537a8c commit c7cb831

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

build.gradle

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ allprojects {
2121
]
2222
}
2323

24-
sourceCompatibility = JavaVersion.VERSION_1_8
25-
targetCompatibility = JavaVersion.VERSION_1_8
24+
java {
25+
sourceCompatibility = JavaVersion.VERSION_1_8
26+
targetCompatibility = JavaVersion.VERSION_1_8
27+
}
2628

2729
tasks.withType(JavaCompile).configureEach {
2830
options.encoding = 'UTF-8'
@@ -63,7 +65,6 @@ subprojects {
6365
apply plugin: 'eclipse'
6466

6567
group = 'cloud.stackit'
66-
version = 'SNAPSHOT'
6768

6869
afterEvaluate { project ->
6970
// only apply to service sub-projects and core
@@ -75,9 +76,11 @@ subprojects {
7576
try {
7677
version = versionFile.text.trim()
7778
} catch (IOException e) {
79+
version = 'SNAPSHOT'
7880
logger.error("Could not read VERSION file for project '${project.name}': ${e.message}")
7981
}
8082
} else {
83+
version = 'SNAPSHOT'
8184
logger.warn("VERSION file not found in project '${project.name}'. Skipping version setting.")
8285
}
8386

@@ -118,13 +121,13 @@ subprojects {
118121
}
119122
}
120123
}
124+
}
121125

122-
// only apply to example sub-projects
123-
if (project.path.startsWith(':examples:')) {
124-
task execute(type:JavaExec) {
125-
main = System.getProperty('mainClass')
126-
classpath = sourceSets.main.runtimeClasspath
127-
}
126+
// only apply to example sub-projects
127+
if (project.path.startsWith(':examples:')) {
128+
tasks.register('execute', JavaExec) {
129+
mainClass = System.getProperty('mainClass')
130+
classpath = sourceSets.main.runtimeClasspath
128131
}
129132
}
130133

examples/iaas/src/main/java/cloud/stackit/sdk/iaas/examples/IaaSExample.java

Lines changed: 0 additions & 5 deletions
This file was deleted.

services/iaas/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ext {
44
}
55

66
dependencies {
7-
implementation project (':core')
87
implementation "com.google.code.findbugs:jsr305:3.0.2"
98
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
109
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'

services/resourcemanager/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ext {
44
}
55

66
dependencies {
7-
implementation project (':core')
87
implementation "com.google.code.findbugs:jsr305:3.0.2"
98
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
109
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'

settings.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ new File(rootDir, "examples").listFiles().each {
1515
include ":examples:${it.name}"
1616
}
1717
}
18-
19-
include ":examples:iaas"

0 commit comments

Comments
 (0)