-
-
Notifications
You must be signed in to change notification settings - Fork 427
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- move to kts gradle build files for plugin
- Loading branch information
Showing
11 changed files
with
112 additions
and
143 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import java.io.FileInputStream | ||
import java.util.* | ||
|
||
plugins { | ||
alias(libs.plugins.conventionPlugin) | ||
alias(baseLibs.plugins.dokka) | ||
alias(baseLibs.plugins.mavenPublish) | ||
id("com.gradle.plugin-publish") version "1.3.0" apply false | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
dependencies { | ||
classpath(baseLibs.kotlin.gradlePlugin.get()) | ||
classpath(baseLibs.android.lint.gradlePlugin.get()) | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
mavenLocal() | ||
} | ||
|
||
val props = Properties() | ||
val propFile = project.layout.files("../gradle.properties").singleFile | ||
if (propFile.exists()) { | ||
props.load(FileInputStream(propFile)) | ||
setProperty("version", props["VERSION_NAME"]) | ||
} else { | ||
throw IllegalStateException("The parent project's gradle.properties file is missing") | ||
} | ||
} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import com.vanniktech.maven.publish.GradlePublishPlugin | ||
|
||
plugins { | ||
id("com.android.lint") | ||
kotlin("jvm") | ||
id("com.gradle.plugin-publish") | ||
id("java-gradle-plugin") | ||
id("org.jetbrains.dokka") | ||
id("com.vanniktech.maven.publish") | ||
} | ||
|
||
|
||
group = "com.mikepenz.aboutlibraries.plugin" | ||
version = rootProject.properties["version"]!! | ||
|
||
gradlePlugin { | ||
website = "https://github.com/mikepenz/AboutLibraries" | ||
vcsUrl = "https://github.com/mikepenz/AboutLibraries" | ||
|
||
plugins { | ||
create("aboutlibsPlugin") { | ||
id = "${project.group}" | ||
implementationClass = "${project.group}.AboutLibrariesPlugin" | ||
description = "Resolve all dependencies used in a gradle module, with associated license and further information." | ||
displayName = "AboutLibraries Library Gradle Plugin" | ||
tags = listOf("libraries", "licenses", "android") | ||
} | ||
} | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
targetCompatibility = JavaVersion.VERSION_11 | ||
} | ||
|
||
kotlin { | ||
jvmToolchain(11) | ||
} | ||
|
||
dependencies { | ||
implementation(gradleApi()) | ||
implementation(localGroovy()) | ||
implementation(libs.kotlin.stdlib) | ||
|
||
// parser the pom.xml files | ||
implementation(libs.ivy.core) | ||
|
||
// add better android support | ||
compileOnly(libs.gradle.build) | ||
|
||
// lint rules | ||
lintChecks(libs.android.lint.gradle) | ||
} | ||
|
||
mavenPublishing { | ||
configure(GradlePublishPlugin()) | ||
} | ||
|
||
dokka { | ||
dokkaSourceSets { | ||
} | ||
} |
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,4 @@ | ||
POM_NAME=AboutLibraries Library Gradle Plugin | ||
POM_DESCRIPTION=Resolve all dependencies used in a gradle module, with associated license and further information. | ||
POM_ARTIFACT_ID=aboutlibraries-plugin | ||
GROUP=com.mikepenz.aboutlibraries.plugin |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rootProject.name = "aboutlibraries-plugin" |
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