gradle

applicationId manifest placeholder for multiple build flavors not working

筅森魡賤 提交于 2020-12-02 06:54:49
问题 I am modifying current android project so it can be installed on same device for multiple flavors and build configs. build.gradle: { // ... defaultConfig { applicationId "com.myapp" manifestPlaceholders = [ manifestApplicationId: "${applicationId}", onesignal_app_id: "xxxx", onesignal_google_project_number: "xxxx" ] // ... } productFlavors { production { applicationId "com.myapp" // ... } dev { applicationId "com.myapp.dev" // ... } // ... } buildTypes { release { // ... } debug {

applicationId manifest placeholder for multiple build flavors not working

 ̄綄美尐妖づ 提交于 2020-12-02 06:53:49
问题 I am modifying current android project so it can be installed on same device for multiple flavors and build configs. build.gradle: { // ... defaultConfig { applicationId "com.myapp" manifestPlaceholders = [ manifestApplicationId: "${applicationId}", onesignal_app_id: "xxxx", onesignal_google_project_number: "xxxx" ] // ... } productFlavors { production { applicationId "com.myapp" // ... } dev { applicationId "com.myapp.dev" // ... } // ... } buildTypes { release { // ... } debug {

How do I use the native JUnit 5 support in Gradle with the Kotlin DSL?

拈花ヽ惹草 提交于 2020-12-02 04:49:53
问题 I want to use the built-in JUnit 5 with the Gradle Kotlin DSL, because during build I get this warning: WARNING: The junit-platform-gradle-plugin is deprecated and will be discontinued in JUnit Platform 1.3. Please use Gradle's native support for running tests on the JUnit Platform (requires Gradle 4.6 or higher): https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle That links tells me to put test { useJUnitPlatform() } in my build.gradle , but what is the syntax for

How do I use the native JUnit 5 support in Gradle with the Kotlin DSL?

我怕爱的太早我们不能终老 提交于 2020-12-02 04:44:49
问题 I want to use the built-in JUnit 5 with the Gradle Kotlin DSL, because during build I get this warning: WARNING: The junit-platform-gradle-plugin is deprecated and will be discontinued in JUnit Platform 1.3. Please use Gradle's native support for running tests on the JUnit Platform (requires Gradle 4.6 or higher): https://junit.org/junit5/docs/current/user-guide/#running-tests-build-gradle That links tells me to put test { useJUnitPlatform() } in my build.gradle , but what is the syntax for

Python基础知识(一)

只谈情不闲聊 提交于 2020-12-01 21:18:48
一、编码规范 PEP-8 编码规范 Python Enhancement Proposals :python改进方案 Guido的关键点之一是:代码更多是用来读而不是写。编码规范旨在改善Python代码的可读性。 风格指南强调一致性。项目、模块或函数保持一致都很重要。 二、语法规范 1.1、注释 所谓注释,就是在程序中添加解释说明,能够大大增强程序的可读性。注释中的内容,不是真正要执行的程序,起辅助说明作用 单行注释 以#开头,#右边的所有东西当做说明 # 我是注释,可以在里写一些功能说明之类的哦 print( 'hello world' ) 多行注释 使用3引号,3个单引号或者3个双引号 ''' 我是多行注释,可以写很多很多行的功能说明 这就是我牛X指出 哈哈哈。。。 ''' """ 我也是多行注释啊,巴拉巴拉。。 """ 1.2、缩进 每级缩进用4个空格 python 不使用 {} 来组织代码,完全依靠缩进,所以缩进的格式非常重要。 使用4个空格来缩进,不要使用 tab ,更不能 tab 和 空格混用。 使用空格的时候永远使用4个空格,不能使用其他数量的空格,否则语法错误。 建议把开发工具的 tab 改成4个空格。 sublime 用如下方式设置:另外 pycharm 默认已经用4个空格替换 tab # 对准左括号 foo = long_function_name(var

第一次运用Android Studio实现模拟机及真实机成功运行hello world(SDK)

我的梦境 提交于 2020-12-01 13:15:06
文章目录 一、下载Android Studio 二、安装Android Studio(安装sdk) 三、Helloworld程序 总结 一、下载Android Studio 点击下载; Android Studio安装包 二、安装Android Studio(安装sdk) 安装包下载完成后,我们双击运行,开始安装Android Studio,根据网上的一些资源一步步慢慢来,你成功安装Android Studio之后开始下面的步骤。 三、Helloworld程序 首先我们新建一个工程,点击上图中的Start a new Android Studio project新建一个工程,进入下面的界面: 我们选择“Empty Activity”,然后Activity名称和布局名称保持默认,点击完成; 在这里设置APK适应的设备类型和最低支持的Android版本,可根据项目需要设置;如图: Helloworld工程就配置完毕了,接下来要等待Gradle构建过程了; 构建完成后,整个工程应该是这个样子如图: 1、选择app–>2、下载好AVD Manager再选择–>3、点击运行run,最后如图所示模拟机运行成功。 1、选择app–>2、连接好真实手–>3、点击运行run,最后如图所示真实机运行成功。 总结 提示:这里对文章进行总结: 例如:以上就是今天要讲的内容

java源码学习-JDK14之jpackage命令

核能气质少年 提交于 2020-12-01 10:22:23
鲁班学院 java源码学习- JDK14之jpackage命令 jpackage命令使用场景 使用场景是面向java桌面端程序打包. 可以让windows/mac 直接双击使用java程序,对系统里面有没有jdk/jre不做要求. 在这里,我们先理一下以前java桌面程序是怎么运行的: jdk8及以前 这时候的java客户端程序,主要分两部分, 一部分是可执行jar包, 一部分是电脑里面要装jdk/jre , 然后通过 java -jar XXXXX.jar 来运行程序. jdk9及以后的模块化 这是java模块化的一个分界线,其实jdk9,jdk10,我都没有用过, 我是直接尝试的jdk11. 在模块化的基础上, 项目多了一个文件, moudle-info.java 如下图所示: 如上图,所示,主要是 requires , opens , exports 这三个关键字. requires : 当前模块想要运行的话,需要哪些依赖,相当于在maven引包的基础上,要再声明一遍依赖 opens: 当前模块中的哪些包,可以被反射. 如fxml中要声明处理的controller , 每当fxml加载的时候,都会去新建一个controller实例, 所以需要opens controller的包名给javafx.fxml exports: 当前模块有哪些包,可以被引用.

How do I generate maven-metata.xml with maven-publish and the artifactory-gradle-plugin?

こ雲淡風輕ζ 提交于 2020-12-01 07:40:44
问题 I've written a Gradle plugin in groovy and used Gradle to build it. I've got a local network Artifactory server that I publish the results to using the Gradle Artifactory plugin and the maven-publish plugin in Gradle. I have another Gradle build script that relies on this plugin as a dependency. I've been able to get this all working if I list my dependency with a specific version. I've tried to use a maven version range (ex. '[1.0,2.0)'), but this fails saying it can't find maven-metadata

How do I generate maven-metata.xml with maven-publish and the artifactory-gradle-plugin?

让人想犯罪 __ 提交于 2020-12-01 07:40:06
问题 I've written a Gradle plugin in groovy and used Gradle to build it. I've got a local network Artifactory server that I publish the results to using the Gradle Artifactory plugin and the maven-publish plugin in Gradle. I have another Gradle build script that relies on this plugin as a dependency. I've been able to get this all working if I list my dependency with a specific version. I've tried to use a maven version range (ex. '[1.0,2.0)'), but this fails saying it can't find maven-metadata

flutter 打包apk

老子叫甜甜 提交于 2020-12-01 00:27:11
打包的具体操作,可以参照官网,只是官网没有那么细 1、修改AndroidManifest.xml 2、构建配置 可以跳过 3、构建签名 4、创建 key.properties 5、配置混淆 6、修改builg配置build.gradle 7、打包 --------------------------------------------------分割线-------------------------------------------------------------------- 1、修改AndroidManifest.xml 路径: <app dir> /android/app/src/main/AndroidManifest.xml 3、构建签名 使用keytool, 可以直接在Android Studio 的terminal里面操作 口令: keytool -genkey -v -keystore G:/keys/test.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias key 区分开来的字段需要注意,存储路径 和 别名, 路径里面的文件自己创建。 输入口令之后,开始填写一些信息,名字,公司....到了 【否】 这里写y,继续,没有报错的话签名就构建ok了,notepad++打开一坨乱码