所以我有一个build.gradle文件,如下所示。 每次刷新gradle时,它都会再次下载所有依赖项,并再次对其进行编译.....请帮助,这真的令人沮丧。...
from django.contrib import admin
from django.urls import path,include
from oscarapi.app import application
# from getdetail import *
# app_name = "eshop"
urlpatterns = [
# path('i18n',django.conf.urls.i18n),
path('admin/', admin.site.urls),
# ath('dashboard/', admin.site.urls),
# path('GET_DET/', include('GET_DETAIL.urls',namespace='GET_DET')),
# path('PUT_DET/', include('PUT_DET.urls',namespace='PUT_DET')),
path('GET_DET/', include('GET_DETAIL.urls')),
path('PUT_DET/', include('PUT_DET.urls')),
# path('oscarapi/', application.urls),
path('', application.urls),
]
我不知道为什么会这样。
我正在使用gradle包装器,并且在Windows 7计算机上不是管理员。
更多信息:
ext.versionProps = new Properties()
ext.versionFile = "src/main/resources/version.properties"
ext.globalVersion = "null"
file(versionFile).withInputStream { versionProps.load(it) }
setVersion("${versionProps.getProperty("major")}." +
"${versionProps.getProperty("minor")}." +
"${versionProps.getProperty("patch")}(" +
"${versionProps.getProperty("commit")})")
apply from: "/gradle/version.gradle"
buildscript {
ext.kotlin_version = "1.3.31"
ext.tornadofx_version = "1.7.18"
ext.junit_version = "5.1.0"
ext.testfx_version = "4.0.15-alpha"
ext.hamcrest_version = "2.0.0.0"
ext.loadui_version = "3.1.2"
ext.guava_version = "22.0"
ext.junit_plugin = "1.1.0"
ext.sonarqube_plugin = "2.7"
ext.launch4j_plugin = "2.4.4"
ext.usb4java = "1.3.0"
ext.hid4java = "0.5.0"
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.junit.platform:junit-platform-gradle-plugin:$junit_plugin"
classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:$sonarqube_plugin"
classpath "edu.sc.seis.gradle:launch4j:$launch4j_plugin"
}
}
apply plugin: "java"
apply plugin: "kotlin"
apply plugin: "application"
apply plugin: "org.sonarqube"
apply plugin: "jacoco"
apply plugin: "edu.sc.seis.launch4j"
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
compile "io.github.microutils:kotlin-logging:1.6.26"
compile "org.slf4j:slf4j-api:1.7.26"
compile "org.slf4j:slf4j-log4j12:1.7.26"
compile "no.tornado:tornadofx:$tornadofx_version"
testCompile "org.junit.jupiter:junit-jupiter-api:$junit_version"
testRuntime "org.junit.jupiter:junit-jupiter-engine:$junit_version"
testCompile "org.testfx:testfx-junit5:$testfx_version"
testCompile "org.testfx:testfx-core:$testfx_version"
testCompile "org.loadui:testFx:$loadui_version"
testCompile "org.mockito:mockito-core:2.27.0"
}
答案 0 :(得分:1)
您可以尝试在项目根目录中配置Gradle构建环境gradle.properties。
org.gradle.caching=true
设置为true时,Gradle将在可能的情况下重用任何先前构建的任务输出,从而使构建速度更快。