简体   繁体   English

IntelliJ在编译时的版权

[英]IntelliJ copyright at compile time

I'm working on a build script that will generate new files for my project at compile time. 我正在构建一个生成脚本,它将在编译时为我的项目生成新文件。 These files will be shared publicly so they need to include the correct copyright information. 这些文件将公开共享,因此它们需要包含正确的版权信息。 Is there any way to reference the copyright profile from IntelliJ to the build script? 有什么方法可以将IntelliJ的版权配置文件引用到构建脚本吗?

Specifically I'm using Gradle so it would be nice to call something like the following: 具体来说,我正在使用Gradle,因此最好调用以下代码:

def codeHeader = <reference to IntelliJ copyright here>
writeCopyrightToFile(codeHeader)

If that doesn't work then is it possible to define the copyright as a system property that I could use when defining the copyright profile as well as in the script? 如果那不起作用,那么是否可以将版权定义为我在定义版权配置文件以及脚本时可以使用的系统属性?

The underlying goal is to have the copyright defined in one location. 基本目标是在一个位置定义版权。

The copyright is stored in a file under the project file tree. 版权存储在项目文件树下的文件中。 Please look into the folder .idea/copyright/ There you will find the copyright xml files for reference. 请查看文件夹.idea/copyright/您将在其中找到版权xml文件以供参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM