去网上搜了一圈,好像大家都是这么配置from
的,具体去Google详细的“kotlin”+“aar”+“源码”关键字时,找到的大多都是开源打包插件的maven-publish
等的配置,而我们公司的是自己写的,没法参考。
尝试了一下使用from android.sourceSets.main.allSource
、from android.sourceSets.main
等配置,都报错。这个可能是因为项目使用了默认的源码路径没有配置sourceSets
,所以检查不到,但偶尔有一次我使用from android.sourceSets.main
时报错提示如下
- What went wrong:
Cannot convert the provided notation to a File or URI: source set main.
The following types/formats are supported:
-
A String or CharSequence path, for example ‘src/main/java’ or ‘/usr/include’.
-
A String or CharSequence URI, for example ‘file:/usr/include’.
-
A File instance.
-
A Path instance.
-
A Directory instance.
-
A RegularFile instance.
-
A URI or URL instance.
灵感乍现,f