Tengo un archivo para el gradle build pero no me funciona ya que me salta el siguiente error:
A problem occurred configuring root project 'koalamarket'. Could not resolve all artifacts for configuration ':classpath'. Could not resolve org.springframework.boot:spring-boot-buildpack-platform:3.2.4. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.4 > org.springframework.boot:spring-boot-gradle-plugin:3.2.4 > Could not resolve org.springframework.boot:spring-boot-buildpack-platform:3.2.4. > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.pom'. > Could not GET 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-buildpack-platform/3.2.4/spring-boot-buildpack-platform-3.2.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information Could not resolve org.springframework.boot:spring-boot-loader-tools:3.2.4. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.4 > org.springframework.boot:spring-boot-gradle-plugin:3.2.4 > Could not resolve org.springframework.boot:spring-boot-loader-tools:3.2.4. > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.pom'. > Could not GET 'https://plugins.gradle.org/m2/org/springframework/boot/spring-boot-loader-tools/3.2.4/spring-boot-loader-tools-3.2.4.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information Could not resolve org.apache.commons:commons-compress:1.21. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.4 > org.springframework.boot:spring-boot-gradle-plugin:3.2.4 > Could not resolve org.apache.commons:commons-compress:1.21. > Could not get resource 'https://plugins.gradle.org/m2/org/apache/commons/commons-compress/1.21/commons-compress-1.21.pom'. > Could not HEAD 'https://plugins.gradle.org/m2/org/apache/commons/commons-compress/1.21/commons-compress-1.21.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information Could not resolve org.springframework:spring-core:6.0.10. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.4 > org.springframework.boot:spring-boot-gradle-plugin:3.2.4 > Could not resolve org.springframework:spring-core:6.0.10. > Could not get resource 'https://plugins.gradle.org/m2/org/springframework/spring-core/6.0.10/spring-core-6.0.10.pom'. > Could not HEAD 'https://plugins.gradle.org/m2/org/springframework/spring-core/6.0.10/spring-core-6.0.10.pom'. > Got socket exception during request. It might be caused by SSL misconfiguration > Connect to localhost:3128 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: no further information
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.
id 'java'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
}
group = 'com.kotlinkoalas'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
jar {
archiveBaseName = 'KoalamarketApplication'
}
test {
enabled = false
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'com.google.code.gson:gson:2.10.1'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
task getDeps(type: Copy) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from configurations.compileClasspath into "libs/"
from configurations.runtimeClasspath into "libs/"
}
Tengo puesto el java 19 y la versión del gradle 8.7