diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0405f6b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,10 @@ +## Releasing + +The plugin is released to MavenCentral and the GradlePluginPortal. To release: + +* Bump the version in PublishingPlugin +* Create a tag +* Push the tag +* Wait for GitHub Actions to build and publish the artifacts +* Go to Sonatype -> close and release the repo + diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index bd74d2d..8749522 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -17,7 +17,7 @@ dependencies { implementation("net.mbonnin.vespene:vespene-lib:0.5") implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21") implementation("com.gradle.publish:plugin-publish-plugin:0.15.0") - implementation("com.gradleup:gr8-plugin:0.4") + implementation("com.gradleup:gr8-plugin:0.6") } gradlePlugin { diff --git a/build-logic/src/main/kotlin/gr8/PublishingPlugin.kt b/build-logic/src/main/kotlin/gr8/PublishingPlugin.kt index 190a765..704a7fd 100644 --- a/build-logic/src/main/kotlin/gr8/PublishingPlugin.kt +++ b/build-logic/src/main/kotlin/gr8/PublishingPlugin.kt @@ -21,7 +21,7 @@ class PublishingPlugin : Plugin { group = "com.gradleup" - version = "0.6" + version = "0.7" val projectVersion = version diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..070cb70 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/plugin-common/src/main/kotlin/com/gradleup/gr8/EmbeddedJarTask.kt b/plugin-common/src/main/kotlin/com/gradleup/gr8/EmbeddedJarTask.kt index 74b9b2f..c3c3c93 100644 --- a/plugin-common/src/main/kotlin/com/gradleup/gr8/EmbeddedJarTask.kt +++ b/plugin-common/src/main/kotlin/com/gradleup/gr8/EmbeddedJarTask.kt @@ -13,11 +13,12 @@ import java.io.File /** * A task that generates an embedded jar from a list of jars */ +@CacheableTask abstract class EmbeddedJarTask : DefaultTask() { - @get:InputFile + @get:Classpath internal abstract val mainJar: RegularFileProperty - @get:InputFiles + @get:Classpath internal abstract val otherJars: ConfigurableFileCollection @get:Input diff --git a/plugin-common/src/main/kotlin/com/gradleup/gr8/Gr8Task.kt b/plugin-common/src/main/kotlin/com/gradleup/gr8/Gr8Task.kt index 82962c2..f4b7311 100644 --- a/plugin-common/src/main/kotlin/com/gradleup/gr8/Gr8Task.kt +++ b/plugin-common/src/main/kotlin/com/gradleup/gr8/Gr8Task.kt @@ -8,28 +8,28 @@ import com.android.tools.r8.R8Command import org.gradle.api.DefaultTask import org.gradle.api.file.* import org.gradle.api.provider.Provider -import org.gradle.api.tasks.InputFiles -import org.gradle.api.tasks.OutputFile -import org.gradle.api.tasks.TaskAction +import org.gradle.api.tasks.* import org.gradle.internal.jvm.Jvm import java.io.File +@CacheableTask abstract class Gr8Task : DefaultTask() { - @get:InputFiles + @get:Classpath internal abstract val programFiles: ConfigurableFileCollection - @get:InputFiles + @get:Classpath internal abstract val classPathFiles: ConfigurableFileCollection + @get:InputFiles + @get:PathSensitive(PathSensitivity.RELATIVE) + internal abstract val proguardConfigurationFiles: ConfigurableFileCollection + @get:OutputFile internal abstract val outputJar: RegularFileProperty @get:OutputFile internal abstract val mapping: RegularFileProperty - @get:InputFiles - internal abstract val proguardConfigurationFiles: ConfigurableFileCollection - fun programFiles(any: Any) { programFiles.from(any) programFiles.disallowChanges()