gradle kotlin_如何在Kotlin中为Android构建Gradle插件

gradle kotlin

Building Gradle plugins isn’t new, and Kotlin isn’t new, and Android isn’t new. By the same token, building Gradle plugins in Kotlin isn’t new, and neither is building Gradle Plugins for Android apps. But building Gradle plugins, in Kotlin, for Android? Well, there’s really just not that much information out there on that.

构建Gradle插件不是新事物,Kotlin也不是新事物,Android也不是新事物。 同样,在Kotlin中构建Gradle插件并不是什么新鲜事,在Android应用程序中构建Gradle插件也不是新鲜事。 但是,在Kotlin中为Android构建Gradle插件吗? 好吧,实际上没有那么多的信息。

Before we get started, I’ll just mention that writing Android Gradle plugins is, in many ways, much easier if you write in Groovy. But what we wanted to do was easy, we wouldn’t be talking about it. So let’s just stick to the plan.

在我们开始之前,我仅提及在许多方面,如果您使用Groovy编写,则编写Android Gradle插件要容易得多。 但是我们想要做的事情很简单,我们不会在谈论它。 因此,让我们坚持计划。

Android部分 (The Android Part)

So there are lots of resources out there on building plugins in Kotlin, and many are great, so if you’re just starting from scratch, maybe go and google that before continuing, because we’re going to skip right to the good stuff: How do you get access to the Android junk in inside your Kotlin Gradle plugin? Glad you asked.

因此,有很多资源可以在Kotlin上构建插件,并且很多资源都很棒,因此,如果您只是从头开始,也许在继续之前先搜索一下Google,因为我们将直接跳到好东西: 您如何在Kotlin Gradle插件中访问Android垃圾? 很高兴你问。

Image for post
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值