Skip to content
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add comment on generated-code property in LICENSE.txt and generated c…
…lasses headers
  • Loading branch information
arnaudruffin committed Mar 30, 2015
commit 362814e7ff3aa33344947dbdef6a0f4271dde88c
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
public class CodeModelGenerator {

private final Filer filer;
private final String aaVersion;
private final String header;

public CodeModelGenerator(Filer filer, String aaVersion) {
this.filer = filer;
this.aaVersion = aaVersion;
this.header = "DO NOT EDIT THIS FILE."
+ "Generated using AndroidAnnotations " + aaVersion + ".\n "
+ "You can create a larger work that contains this file and distribute that work under terms of your choice.\n";
}

public void generate(ModelProcessor.ProcessResult processResult) throws IOException {
Expand All @@ -40,7 +42,7 @@ public void generate(ModelProcessor.ProcessResult processResult) throws IOExcept

SourceCodewriter sourceCodeWriter = new SourceCodewriter(filer, processResult.originatingElements);

PrologCodeWriter prologCodeWriter = new PrologCodeWriter(sourceCodeWriter, "DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations " + aaVersion + ".\n");
PrologCodeWriter prologCodeWriter = new PrologCodeWriter(sourceCodeWriter, header);

processResult.codeModel.build(prologCodeWriter, new ResourceCodeWriter(filer));
}
Expand Down
4 changes: 4 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ product.

We are therefore allowed to distribute CodeModel without Modification as
part of AndroidAnnotations.

About AndroidAnnotations generated files: if you create a larger work that
contains files generated by AndroidAnnotations, you can distribute that work
under terms of your choice.