-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Demo/Sample Project with the new plugins #245
Comments
@cdsap I've been playing with this while testing a few changes to address #231.
With configuration:
After some digging, I realized that fun publishers(block: PublishersConfiguration.() -> Unit) {
....
} Changing it to take a |
Hi, I think the problem is coming when we try to include in the classpath of the build script the dsl configuration. I tested different scenarios, first using groovy and defining everything in the root build.gradle of a given project: buildscript {
ext.kotlin_version = "1.4.10"
repositories {
jcenter()
maven {
url "http://oss.jfrog.org/artifactory/oss-snapshot-local"
}
}
dependencies {
classpath "com.cdsap.talaiot.plugin:base:1.3.6-SNAPSHOT"
}
}
apply plugin: "com.cdsap.talaiot.plugin.base"
talaiot {
publishers {
jsonPublisher = true
}
} this case is correct, then testing with kts we can reproduce the problem, but is not something new, if we test a previous snapshot version, we have the same problem in kts: buildscript {
repositories {
jcenter()
maven ( url = uri("http://oss.jfrog.org/artifactory/oss-snapshot-local") )
}
dependencies {
classpath("com.cdsap:talaiot:1.3.4-SNAPSHOT")
}
}
apply(plugin = "com.cdsap.talaiot")
talaiot {
publishers {
timelinePublisher = true
jsonPublisher = false
}
} That's the behavior(now) of the kts implementation. If you are wondering why is working with the release builds it's because the release plugins are published to the Gradle plugin portal. This allows us to use: plugins {
id("com.cdsap.talaiot") version "1.3.5"
}
talaiot {
publishers {
timelinePublisher = true
jsonPublisher = false
}
} The plugin configuration uses the Gradle Plugin repository and we don't have the problem including in the buildScript section for kts. Finally, if you are finding these problems in other projects one way to apply the plugin(in case you are injecting scripts or you want to customize the logic) you can use: apply from: stuff.gradle.kts
buildscript {
repositories {
maven {
}
}
dependencies {
classpath(PLUGIN)
}
}
apply<Plugin>()
configure<PluginExtension>() {
} So we need to find the better way to implement the sample:
|
Thanks for the explanation. I thought it could be a type issue, not very familiar with Kotlin DSL to be honest. I will play a bit more with the sample to try and learn more about it. I've updated the settings to "work" with all plugins in a not very elegant way, hehe.
The way I envision it, we would have many sample modules, each with a different configuration. No need to cover all, since some may be very similar. I'd like to have at least one Groovy sample as well if possible. That should help with #117. |
@cdsap I can look into this during this week. May I assign it to myself? Is there any particular samples you want to have? |
Sure, no problem. |
Sounds good. I'll wait for #258 to be merged and published. Then I should be able to prepare the samples. 👍 |
new PR creating 2.0 release, ignoring 1.4 |
No description provided.
The text was updated successfully, but these errors were encountered: