Skip to content

Commit ab93fc6

Browse files
committed
Small changes
1 parent 3beced0 commit ab93fc6

File tree

7 files changed

+33
-9
lines changed

7 files changed

+33
-9
lines changed

.idea/codeStyles/Project.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Grease_grease__publishToDirectory_.xml renamed to .idea/runConfigurations/Grease_grease__publishAllDirectory_.xml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
}
1111

1212
dependencies {
13-
classpath("com.otaliastudios.tools:publisher:0.3.3")
13+
classpath("io.deepmedia.tools:publisher:0.4.0")
1414
classpath("com.otaliastudios.tools:grease:0.1.0") {
1515
isChanging = true
1616
}
@@ -25,6 +25,6 @@ allprojects {
2525
}
2626
}
2727

28-
tasks.create("clean", Delete::class) {
28+
tasks.register("clean", Delete::class) {
2929
delete(buildDir)
3030
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip

grease/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ publisher {
2323
project.group = "com.otaliastudios.tools"
2424
project.url = "https://github.com/natario1/Grease"
2525
project.vcsUrl = "https://github.com/natario1/Grease.git"
26-
release.version = "0.1.1"
26+
release.version = "0.1.2"
2727
// release.setSources(Release.SOURCES_AUTO)
2828
// release.setDocs(Release.DOCS_AUTO)
2929
directory {

grease/src/main/kotlin/com/otaliastudios/tools/grease/configurations.kt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.otaliastudios.tools.grease
22

3+
import com.android.build.api.attributes.BuildTypeAttr
34
import com.android.build.gradle.api.LibraryVariant
45
import com.android.build.gradle.internal.dsl.BuildType
56
import com.android.build.gradle.internal.dsl.ProductFlavor
@@ -10,6 +11,7 @@ import org.gradle.api.Project
1011
import org.gradle.api.artifacts.Configuration
1112
import org.gradle.api.attributes.Usage
1213
import org.gradle.kotlin.dsl.get
14+
import org.gradle.kotlin.dsl.named
1315

1416
internal fun Configuration.artifactsOf(type: AndroidArtifacts.ArtifactType)
1517
= incoming.artifactView {
@@ -58,7 +60,8 @@ private fun Project.createGrease(name: String): Configuration {
5860
attribute(Usage.USAGE_ATTRIBUTE, objects.named(Usage::class.java, Usage.JAVA_RUNTIME))
5961
}
6062
configurations.configureEach {
61-
if (name == nameOf(name, "compileClasspath")) {
63+
val other = this
64+
if (other.name == nameOf(name, "compileClasspath")) {
6265
extendsFrom(configuration)
6366
}
6467
}
@@ -88,9 +91,13 @@ internal fun Project.createProductFlavorConfigurations(
8891
internal fun Project.createBuildTypeConfigurations(
8992
buildTypes: NamedDomainObjectContainer<BuildType>, log: Logger) {
9093
buildTypes.configureEach {
91-
log.i { "Creating build type configuration ${this.name.greasify()}..." }
92-
val config = createGrease(this.name)
94+
val buildType = this
95+
log.i { "Creating build type configuration ${buildType.name.greasify()}..." }
96+
val config = createGrease(buildType.name)
9397
config.extendsFrom(grease)
98+
config.attributes {
99+
attribute(BuildTypeAttr.ATTRIBUTE, objects.named(BuildTypeAttr::class, buildType.name))
100+
}
94101
}
95102
}
96103

0 commit comments

Comments
 (0)