File tree Expand file tree Collapse file tree 3 files changed +49
-1
lines changed 
src/main/java/source-generator-example Expand file tree Collapse file tree 3 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,9 @@ maven_install(
6969    artifacts  =  [
7070        "com.google.protobuf:protobuf-java:3.15.6" , # Required dependency by scip-java. 
7171        "com.google.protobuf:protobuf-java-util:3.15.6" , # Required dependency by scip-java. 
72-         "com.google.guava:guava:31.0-jre" , # Not required dependency, only used by tests. 
72+         # These dependencies are only required for the tests 
73+         "com.google.guava:guava:31.0-jre" , 
74+         "com.google.auto.value:auto-value:1.5.3" ,
7375    ],
7476    repositories  =  [
7577         "https://repo1.maven.org/maven2" ,
Original file line number Diff line number Diff line change 1+ 
2+ import  com .google .auto .value .AutoValue ;
3+ 
4+ @ AutoValue 
5+ abstract  class  Animal  {
6+   static  Animal  create (String  name , int  numberOfLegs ) {
7+     return  new  AutoValue_Animal (name , numberOfLegs );
8+   }
9+ 
10+   abstract  String  name ();
11+   abstract  int  numberOfLegs ();
12+ }
Original file line number Diff line number Diff line change 1+ load ("@scip_java//semanticdb-javac:defs.bzl" , "java_library" )
2+ load ("@rules_java//java:defs.bzl" , "java_plugin" )
3+ 
4+ package (
5+     default_visibility  =  ["//visibility:public" ],
6+ )
7+ 
8+ java_library (
9+ 	name  =  "animal" ,
10+ 	srcs  =  ["Animal.java" ],
11+ 	deps  =  [
12+     ":autovalue" ,
13+ 	],
14+ )
15+ 
16+ java_plugin (
17+     name  =  "autovalue_plugin" ,
18+     processor_class  =  "com.google.auto.value.processor.AutoValueProcessor" ,
19+     deps  =  [
20+         "@maven//:com_google_auto_value_auto_value" ,
21+     ],
22+ )
23+ 
24+ java_library (
25+     name  =  "autovalue" ,
26+     exported_plugins  =  [
27+         ":autovalue_plugin" ,
28+     ],
29+     neverlink  =  1 ,
30+     exports  =  [
31+         "@maven//:com_google_auto_value_auto_value" ,
32+     ],
33+ )
34+ 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments