Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Add comment on generated-code property in LICENSE.txt and generated c…
Browse files Browse the repository at this point in the history
…lasses headers
  • Loading branch information
arnaudruffin committed Mar 30, 2015
1 parent 0f65e00 commit 362814e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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
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.

0 comments on commit 362814e

Please sign in to comment.