Skip to content

Commit 3c5fc73

Browse files
authored
Merge pull request #8 from GradleUp/build-cache
Make the plugin build cache compatible
2 parents 4688221 + ea90650 commit 3c5fc73

File tree

6 files changed

+24
-13
lines changed

6 files changed

+24
-13
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## Releasing
2+
3+
The plugin is released to MavenCentral and the GradlePluginPortal. To release:
4+
5+
* Bump the version in PublishingPlugin
6+
* Create a tag
7+
* Push the tag
8+
* Wait for GitHub Actions to build and publish the artifacts
9+
* Go to Sonatype -> close and release the repo
10+

build-logic/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dependencies {
1717
implementation("net.mbonnin.vespene:vespene-lib:0.5")
1818
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
1919
implementation("com.gradle.publish:plugin-publish-plugin:0.15.0")
20-
implementation("com.gradleup:gr8-plugin:0.4")
20+
implementation("com.gradleup:gr8-plugin:0.6")
2121
}
2222

2323
gradlePlugin {

build-logic/src/main/kotlin/gr8/PublishingPlugin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PublishingPlugin : Plugin<Project> {
2121

2222

2323
group = "com.gradleup"
24-
version = "0.6"
24+
version = "0.7"
2525

2626
val projectVersion = version
2727

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

plugin-common/src/main/kotlin/com/gradleup/gr8/EmbeddedJarTask.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import java.io.File
1313
/**
1414
* A task that generates an embedded jar from a list of jars
1515
*/
16+
@CacheableTask
1617
abstract class EmbeddedJarTask : DefaultTask() {
17-
@get:InputFile
18+
@get:Classpath
1819
internal abstract val mainJar: RegularFileProperty
1920

20-
@get:InputFiles
21+
@get:Classpath
2122
internal abstract val otherJars: ConfigurableFileCollection
2223

2324
@get:Input

plugin-common/src/main/kotlin/com/gradleup/gr8/Gr8Task.kt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,28 @@ import com.android.tools.r8.R8Command
88
import org.gradle.api.DefaultTask
99
import org.gradle.api.file.*
1010
import org.gradle.api.provider.Provider
11-
import org.gradle.api.tasks.InputFiles
12-
import org.gradle.api.tasks.OutputFile
13-
import org.gradle.api.tasks.TaskAction
11+
import org.gradle.api.tasks.*
1412
import org.gradle.internal.jvm.Jvm
1513
import java.io.File
1614

15+
@CacheableTask
1716
abstract class Gr8Task : DefaultTask() {
18-
@get:InputFiles
17+
@get:Classpath
1918
internal abstract val programFiles: ConfigurableFileCollection
2019

21-
@get:InputFiles
20+
@get:Classpath
2221
internal abstract val classPathFiles: ConfigurableFileCollection
2322

23+
@get:InputFiles
24+
@get:PathSensitive(PathSensitivity.RELATIVE)
25+
internal abstract val proguardConfigurationFiles: ConfigurableFileCollection
26+
2427
@get:OutputFile
2528
internal abstract val outputJar: RegularFileProperty
2629

2730
@get:OutputFile
2831
internal abstract val mapping: RegularFileProperty
2932

30-
@get:InputFiles
31-
internal abstract val proguardConfigurationFiles: ConfigurableFileCollection
32-
3333
fun programFiles(any: Any) {
3434
programFiles.from(any)
3535
programFiles.disallowChanges()

0 commit comments

Comments
 (0)