/* * Copyright (c) 2020 - present Cloudogu GmbH * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see https://www.gnu.org/licenses/. */ plugins { id 'org.scm-manager.smp' version '0.17.0' } def jgitVersion = '7.1.0.202411261347-r-scm1' dependencies { // required by scm-it api "sonia.jgit:org.eclipse.jgit:${jgitVersion}" implementation "sonia.jgit:org.eclipse.jgit.http.server:${jgitVersion}" implementation "sonia.jgit:org.eclipse.jgit.lfs.server:${jgitVersion}" implementation "sonia.jgit:org.eclipse.jgit.gpg.bc:${jgitVersion}" implementation libraries.commonsCompress testImplementation "sonia.jgit:org.eclipse.jgit.junit.http:${jgitVersion}" testImplementation libraries.shiroUnit testImplementation libraries.awaitility } scmPlugin { scmVersion = project.version core = true name = "scm-git-plugin" displayName = 'Git' description = 'Plugin for the version control system Git' author = 'Cloudogu GmbH' category = 'Source Code Management' avatarUrl = '/images/git-logo.png' openapi { packages = [ 'sonia.scm.api.v2.resources' ] } } task testJar(type: Jar) { classifier = 'tests' from sourceSets.test.output } task insertJGitVersionFile() { def file = new File(project.buildDir, "resources/main/sonia/scm/version/scm-git-plugin") file.parentFile.mkdirs() file.createNewFile() file.text = "scm-git-plugin/${project.version} org.eclipse.jgit/${jgitVersion}" } tasks.named("build") { it.finalizedBy(insertJGitVersionFile) } configurations { tests { canBeConsumed = true canBeResolved = false } } artifacts { tests(testJar) }