Subversion Repositories SmartDukaan

Rev

Rev 37491 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
22426 ashik.ali 1
apply plugin: 'java'
2
apply plugin: 'maven'
3
apply plugin: 'war'
24313 amit.gupta 4
apply plugin: 'eclipse'
5
//apply plugin: 'nebula.provided-base'
22426 ashik.ali 6
 
24313 amit.gupta 7
 
22426 ashik.ali 8
group = 'com.profitmandi'
36878 aman 9
version = '0.0.1-SNAPSHOT'
22426 ashik.ali 10
 
11
description = """profitmandi-fofo"""
12
 
13
sourceCompatibility = 1.8
14
targetCompatibility = 1.8
29901 amit.gupta 15
ext['log4j2.version'] = '2.15.0'
22426 ashik.ali 16
 
17
 
18
repositories {
33258 ranu 19
 
20
    mavenCentral()
21
    mavenLocal()
22426 ashik.ali 22
}
22530 ashik.ali 23
 
24
 
35433 amit 25
task run{
33265 ranu 26
    Set environments = ["dev", "staging", "prod"]
27
    def environment = "dev"
35433 amit 28
    if ( project.hasProperty("env") ) {
33258 ranu 29
        environment = project.getProperty("env")
35433 amit 30
        if(!environments.contains(environment)){
33258 ranu 31
            logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");
32
            environment = "dev"
33
        }
35433 amit 34
    }else{
33258 ranu 35
        logger.warn("Invalid key")
22530 ashik.ali 36
    }
35433 amit 37
    ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
38
        entry( key: "profile", value: environment)
33265 ranu 39
    }
35433 amit 40
    logger.warn("Build is being build by "+environment)
22530 ashik.ali 41
}
42
 
35433 amit 43
tasks.build.doLast(){
44
    ant.propertyfile( file: "src/main/resources/META-INF/env.property"){
45
        entry( key: "profile", value: "dev")
33265 ranu 46
    }
22530 ashik.ali 47
}
48
 
22426 ashik.ali 49
dependencies {
37491 amit 50
    // Ships ERROR-level log events to GlitchTip (self-hosted, Sentry protocol).
51
    // Pinned to 7.x: 8.x drops Java 8. Verified class major version 52.
52
    implementation 'io.sentry:sentry-log4j2:7.22.6'
53
 
35433 amit 54
    compile project (':profitmandi-common')
55
    compile project (':profitmandi-dao')
30471 amit.gupta 56
 
37337 amit 57
    // PDF table extraction for the Pine Labs affordability circular. Lives here because
58
    // the parse now runs in this application rather than in profitmandi-cron; keep it
59
    // out of profitmandi-common, or PDFBox reaches the web WAR too (common deliberately
60
    // keeps pdfbox at test scope).
61
    //   - bouncycastle is only for encrypted PDFs (ours are not) and its
62
    //     bcprov-jdk15on:1.69 clashes with the bcprov already on this classpath
63
    //   - slf4j-simple would bind as a second SLF4J provider against log4j2
64
    //   - jai-imageio is image decoding; we read text and rulings only
65
    implementation('technology.tabula:tabula:1.0.5') {
66
        exclude group: 'org.bouncycastle'
67
        exclude group: 'org.slf4j', module: 'slf4j-simple'
68
        exclude group: 'com.github.jai-imageio'
69
    }
70
 
71
 
35433 amit 72
    compile(group: 'org.apache.velocity', name: 'velocity-tools', version: '1.3') {
33265 ranu 73
        exclude(module: 'commons-logging')
74
        exclude(module: 'commons-digester')
75
        //exclude(module: 'commons-collections')
76
        exclude(module: 'dom4j')
77
        exclude(module: 'antlr')
78
        exclude(module: 'velocity')
30471 amit.gupta 79
 
33265 ranu 80
    }
33258 ranu 81
    compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
82
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
33265 ranu 83
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
84
    compile group: 'org.apache.commons', name: 'commons-csv', version: '1.5'
85
    compile 'org.apache.poi:poi-ooxml:3.16'
34687 amit.gupta 86
    // Add HikariCP dependency
87
    implementation 'com.zaxxer:HikariCP:3.4.5' // Use the latest version
35433 amit 88
    // https://mvnrepository.com/artifact/org.xhtmlrenderer/core-renderer
89
    compile (group: 'org.xhtmlrenderer', name: 'core-renderer', version: 'R8') {
90
        exclude(module : 'bcprov-jdk14')
91
    }
29901 amit.gupta 92
 
35433 amit 93
 
94
 
95
 
22860 ashik.ali 96
    testCompile "junit:junit:4.12"
33265 ranu 97
    //provided 'org.projectlombok:lombok:1.18.2'
35879 ranu 98
 
99
    // Selenium for Knowlarity scraping (Java 8 compatible versions)
22426 ashik.ali 100
}
22860 ashik.ali 101
 
102
test {
103
    testLogging.showStandardStreams = true
23114 ashik.ali 104
    // for enable or disable test cases
33258 ranu 105
 
23175 ashik.ali 106
    exclude 'com/spice/profitmandi/service/generic/GenericServiceTest.class'
33265 ranu 107
}
37337 amit 108
 
109
// Writes this module's runtime classpath to build/circular-classpath.txt so the
110
// offer-circular ingest can be driven locally outside Spring - see
111
// scripts/offer_circular/README.md ("Running and measuring an ingest locally").
112
// Lives here now that the parser does; it used to sit in profitmandi-cron.
113
task dumpCircularClasspath {
114
    doLast {
115
        new File("$buildDir/circular-classpath.txt").text =
116
                sourceSets.main.runtimeClasspath.asPath
117
    }
118
}