如何创建外部依赖gradle项目?
How to create external dependency gradle project?
我想创建一个 android 项目,我想将其用作库。我想像使用任何其他 gradle 库一样使用此库,所以我的问题是,我如何创建一个以后可以作为依赖项使用的库项目。
以我的项目为例:
com.xyz.core
我想在我的 android 项目中使用这个库项目作为依赖项,如下所示:
compile com.xyz.core
所以我想创建一个全局库,我可以从任何地方访问它,并且可以使用 gradle。
我该怎么做?
To create a new module, select File > New > Module. Select the desire module type then click Next to enter the basic module settings:
- Enter an Application Name. This name is used as the title of your application launcher icon when it is installed on a device.
Enter a Module Name. This text is used as the name of the folder where your Java-based activity files are stored.
- Enter a Package Name and Package Location. This class package namespace creates the initial package structure for your applications code files and is added as the package attribute in your application's Android manifest file. This manifest value serves as the unique identifier for your application app when you distribute it to users. The package name must follow the same rules as packages in the Java programming language.
- ...
要制作您的模块 "public",您可以将其上传到 Github and sync it to bintray (jcenter, maven... .
等网站
我想创建一个 android 项目,我想将其用作库。我想像使用任何其他 gradle 库一样使用此库,所以我的问题是,我如何创建一个以后可以作为依赖项使用的库项目。
以我的项目为例: com.xyz.core
我想在我的 android 项目中使用这个库项目作为依赖项,如下所示:
compile com.xyz.core
所以我想创建一个全局库,我可以从任何地方访问它,并且可以使用 gradle。
我该怎么做?
To create a new module, select File > New > Module. Select the desire module type then click Next to enter the basic module settings:
- Enter an Application Name. This name is used as the title of your application launcher icon when it is installed on a device. Enter a Module Name. This text is used as the name of the folder where your Java-based activity files are stored.
- Enter a Package Name and Package Location. This class package namespace creates the initial package structure for your applications code files and is added as the package attribute in your application's Android manifest file. This manifest value serves as the unique identifier for your application app when you distribute it to users. The package name must follow the same rules as packages in the Java programming language.
- ...
要制作您的模块 "public",您可以将其上传到 Github and sync it to bintray (jcenter, maven... .
等网站