-
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.
Replace buildSrc by includedBuild and update project urls
- Loading branch information
Showing
13 changed files
with
53 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
dependencyResolutionManagement { | ||
@Suppress("UnstableApiUsage") | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
buildSrc/src/main/kotlin/PropertyOrEnv.kt → ...-plugins/src/main/kotlin/PropertyOrEnv.kt
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import org.gradle.api.Project | ||
|
||
fun Project.propertyOrEnv(key: String): String { | ||
internal fun Project.propertyOrEnv(key: String): String { | ||
return findProperty(key) as String? | ||
?: System.getenv(key) | ||
?: error("Didn't find any value for the key \"$key\" in Project properties or environment variables.") | ||
} | ||
|
||
fun Project.propertyOrEnvOrNull(key: String): String? { | ||
internal fun Project.propertyOrEnvOrNull(key: String): String? { | ||
return findProperty(key) as String? ?: System.getenv(key) | ||
} |
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 |
---|---|---|
|
@@ -5,3 +5,7 @@ plugins { | |
dependencies { | ||
compileOnly(gradleKotlinDsl()) | ||
} | ||
|
||
gradlePlugin { | ||
vcsUrl = Publishing.gitUrl | ||
} |
File renamed without changes.
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 |
---|---|---|
|
@@ -5,54 +5,55 @@ import org.gradle.api.publish.maven.MavenPublication | |
import org.gradle.api.tasks.TaskContainer | ||
import org.gradle.api.tasks.TaskProvider | ||
import org.gradle.api.tasks.bundling.Jar | ||
import org.gradle.kotlin.dsl.assign | ||
import org.gradle.kotlin.dsl.named | ||
import org.gradle.kotlin.dsl.register | ||
|
||
object Publishing { | ||
const val gitUrl = "https://github.com/LouisCAD/LibPublishingHelpers.git" | ||
const val siteUrl = "https://github.com/LouisCAD/LibPublishingHelpers" | ||
internal object Publishing { | ||
const val gitUrl = "https://github.com/Splitties/LibPublishingHelpers.git" | ||
const val siteUrl = "https://github.com/Splitties/LibPublishingHelpers" | ||
const val libraryDesc = "Tools for semi-auto library publishing (and other chores). Designed for Kotlin scripts." | ||
} | ||
|
||
fun TaskContainer.emptyJavadocJar(): TaskProvider<Jar> { | ||
internal fun TaskContainer.emptyJavadocJar(): TaskProvider<Jar> { | ||
val taskName = "javadocJar" | ||
return try { | ||
named(name = taskName) | ||
} catch (e: UnknownTaskException) { | ||
register(name = taskName) { archiveClassifier by "javadoc" } | ||
register(name = taskName) { archiveClassifier = "javadoc" } | ||
} | ||
} | ||
|
||
fun MavenPublication.setupPom( | ||
internal fun MavenPublication.setupPom( | ||
gitUrl: String = Publishing.gitUrl, | ||
siteUrl: String = Publishing.siteUrl, | ||
libraryDesc: String = Publishing.libraryDesc | ||
) = pom { | ||
if (name.isPresent.not()) { | ||
name by artifactId | ||
name = artifactId | ||
} | ||
description by libraryDesc | ||
url by siteUrl | ||
description = libraryDesc | ||
url = siteUrl | ||
licenses { | ||
license { | ||
name by "The Apache Software License, Version 2.0" | ||
url by "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
name = "The Apache Software License, Version 2.0" | ||
url = "https://www.apache.org/licenses/LICENSE-2.0.txt" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id by "louiscad" | ||
name by "Louis CAD" | ||
email by "[email protected]" | ||
id = "louiscad" | ||
name = "Louis CAD" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection by gitUrl | ||
developerConnection by gitUrl | ||
url by siteUrl | ||
connection = gitUrl | ||
developerConnection = gitUrl | ||
url = siteUrl | ||
} | ||
if (gitUrl.startsWith("https://github.com")) issueManagement { | ||
system by "GitHub" | ||
url by gitUrl.replace(".git", "/issues") | ||
system = "GitHub" | ||
url = gitUrl.replace(".git", "/issues") | ||
} | ||
} |
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
File renamed without changes.
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
plugins { | ||
`kotlin-jvm-lib` | ||
id("kotlin-jvm-lib") | ||
} | ||
|
||
group = "com.louiscad.incubator" |
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