如何使用 gradle 检查远程存储库中是否存在工件?
我还没有找到任何可以完成此任务的 gradle 插件。
我有一个想法,在 build.gradle 中创建一个函数来检查存储库的 url 是否存在。但这似乎不是正确的做法。
Boolean ifExists = new URL(url).openConnection().with {
requestMethod = 'HEAD'
connect()
responseCode == 200
}
Run Code Online (Sandbox Code Playgroud)
任何建议将不胜感激。
我目前正在开发一个需要非常简单的倒数计时器的项目,它在 tkinter GUI 中工作并且不依赖于递归。我尝试了不同的东西,但到目前为止似乎没有任何效果。
import time
from tkinter import *
root = Tk()
root.title("Timer")
root.geometry("100x100")
def countdown(count):
label = Label(root, text= count)
label.place(x=35, y=15)
for i in range(5,0,-1):
countdown(i)
time.sleep(1)
root.mainloop()
Run Code Online (Sandbox Code Playgroud)