-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
371 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright (C) 2024 OpenAni and contributors. | ||
* | ||
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证. | ||
* Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link. | ||
* | ||
* https://github.com/open-ani/ani/blob/main/LICENSE | ||
*/ | ||
|
||
@file:OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
|
||
import com.vanniktech.maven.publish.JavaLibrary | ||
import com.vanniktech.maven.publish.JavadocJar | ||
import com.vanniktech.maven.publish.SonatypeHost | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
|
||
plugins { | ||
java | ||
idea | ||
alias(libs.plugins.vanniktech.mavenPublish) | ||
} | ||
|
||
java { | ||
toolchain.languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
|
||
sourceSets.main { | ||
java.srcDirs(layout.buildDirectory.dir("generated-sources/swig")) | ||
} | ||
|
||
val copyGeneratedSwigJava = tasks.register("copyGeneratedSwigJava", Copy::class) { | ||
dependsOn(projects.anitorrentNative.dependencyProject.tasks.named("generateSwigImpl")) | ||
from(projects.anitorrentNative.dependencyProject.projectDir.resolve("gen/java")) | ||
into(layout.buildDirectory.dir("generated-sources/swig")) | ||
} | ||
|
||
tasks.compileJava { | ||
dependsOn(copyGeneratedSwigJava) | ||
} | ||
|
||
mavenPublishing { | ||
configure(JavaLibrary(JavadocJar.Empty(), true)) | ||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL) | ||
signAllPublications() | ||
|
||
pom { | ||
name = "Anitorrent Native" | ||
description = "Anitorrent Native" | ||
url = "https://github.com/open-ani/anitorrent" | ||
|
||
licenses { | ||
license { | ||
name = "GNU General Public License, Version 3" | ||
url = "https://github.com/open-ani/anitorrent/blob/main/LICENSE" | ||
distribution = "https://www.gnu.org/licenses/gpl-3.0.txt" | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id = "openani" | ||
name = "OpenAni and contributors" | ||
email = "[email protected]" | ||
} | ||
} | ||
|
||
scm { | ||
connection = "scm:git:https://github.com/open-ani/anitorrent.git" | ||
developerConnection = "scm:git:[email protected]:open-ani/anitorrent.git" | ||
url = "https://github.com/open-ani/anitorrent" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.