Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
23723 amit.gupta 1
buildscript {
30212 amit.gupta 2
    ext {
3
        springBootVersion = '2.0.2.RELEASE'
4
    }
5
    repositories {
6
        mavenCentral()
7
    }
8
    dependencies {
9
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
10
    }
23723 amit.gupta 11
}
12
 
25750 amit.gupta 13
 
23723 amit.gupta 14
apply plugin: 'java'
15
apply plugin: 'eclipse'
16
apply plugin: 'org.springframework.boot'
17
apply plugin: 'io.spring.dependency-management'
18
 
19
group = 'com.smartdukaan'
20
version = '0.0.1-SNAPSHOT'
21
sourceCompatibility = 1.8
29700 amit.gupta 22
ext['log4j2.version'] = '2.16.0'
23723 amit.gupta 23
repositories {
30212 amit.gupta 24
 
25
    maven { url "https://repo.maven.apache.org/maven2" }
26
    maven { url 'https://jitpack.io' }
27
    mavenLocal()
23723 amit.gupta 28
}
29
 
35832 amit 30
task run {
31
    Set environments = ["dev", "staging", "prod"]
30212 amit.gupta 32
    def environment = "dev"
33
    if (project.hasProperty("env")) {
34
        if (environments.contains(project.getProperty("env"))) {
35
            environment = project.getProperty("env");
36
        } else {
37
            logger.warn("Invalid Environment value, Choose any 'dev', 'staging', 'prod'");
38
            logger.info("Environment set to dev");
39
        }
40
    } else {
41
        logger.info("Environment set to dev");
42
    }
35832 amit 43
    ant.propertyfile(file: "src/main/resources/META-INF/env.property") {
44
        entry(key: "profile", value: environment)
30212 amit.gupta 45
    }
34554 tejus.loha 46
    logger.info("Build is being built by " + environment)
23723 amit.gupta 47
}
48
 
35832 amit 49
tasks.build.doLast() {
50
    ant.propertyfile(file: "src/main/resources/META-INF/env.property") {
51
        entry(key: "profile", value: "dev")
52
    }
53
}
23723 amit.gupta 54
 
35832 amit 55
 
23723 amit.gupta 56
dependencies {
30212 amit.gupta 57
    compile('org.springframework.boot:spring-boot-starter') {
58
        exclude(module: 'logback-classic')
59
        exclude(module: 'spring-boot-starter-logging')
60
    }
61
    implementation group: 'org.springframework', name: 'spring-context-support', version: '4.3.6.RELEASE'
62
 
63
    compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
64
    compile project(':profitmandi-common')
65
    compile project(':profitmandi-dao')
37330 amit 66
 
67
    // PDF table extraction for the Pine Labs affordability circular. Lives here and
68
    // NOT in profitmandi-common so PDFBox never reaches the web/fofo WARs - common
69
    // deliberately keeps pdfbox at test scope only.
70
    //   - bouncycastle is only for encrypted PDFs (ours are not) and its
71
    //     bcprov-jdk15on:1.69 would clash with bcprov-jdk16:1.45 already here
72
    //   - slf4j-simple would bind as a second SLF4J provider against log4j2
73
    //   - jai-imageio is image decoding; we read text and rulings only
74
    implementation('technology.tabula:tabula:1.0.5') {
75
        exclude group: 'org.bouncycastle'
76
        exclude group: 'org.slf4j', module: 'slf4j-simple'
77
        exclude group: 'com.github.jai-imageio'
78
    }
24434 amit.gupta 79
    compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
30212 amit.gupta 80
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
81
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
82
    compile group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
83
    compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.41.0'
84
    implementation 'org.jsoup:jsoup:1.11.3'
85
    implementation 'org.apache.httpcomponents:httpclient:4.5.13'
86
    implementation 'org.bouncycastle:bcprov-jdk16:1.45'
34101 amit.gupta 87
    //dependency needed to resolve okhttp and further required for selenium
35851 amit 88
    implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
34101 amit.gupta 89
 
30212 amit.gupta 90
    // https://mvnrepository.com/artifact/opencv/opencv
35851 amit 91
    implementation group: 'org.openpnp', name: 'opencv', version: '3.4.2-0'
34039 vikas.jang 92
    implementation('com.google.auth:google-auth-library-oauth2-http:1.17.0') {
93
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
94
        exclude group: 'com.google.guava', module: 'guava'
95
    }
30212 amit.gupta 96
 
35832 amit 97
    dependencies {
98
        implementation 'org.jsoup:jsoup:1.18.1'
99
    }
34094 amit.gupta 100
 
35832 amit 101
 
102
 
34554 tejus.loha 103
    implementation('org.springframework.boot:spring-boot-starter-actuator') {
104
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
105
    }
106
 
107
    implementation('io.micrometer:micrometer-core') {
108
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
109
    }
110
 
111
    implementation('io.micrometer:micrometer-registry-prometheus') {
112
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
113
    }
114
 
115
    implementation 'org.springframework.boot:spring-boot-starter-log4j2'
116
 
117
    implementation('org.springframework.boot:spring-boot-starter-web') {
118
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
119
    }
120
    implementation 'org.aspectj:aspectjweaver'
121
    implementation ('org.springframework.boot:spring-boot-starter-security'){
122
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
123
    }
124
 
34688 amit.gupta 125
 
126
    // Add HikariCP dependency
127
    implementation 'com.zaxxer:HikariCP:3.4.5' // Use the latest version
34860 ranu 128
    implementation 'net.lingala.zip4j:zip4j:2.11.5'
34688 amit.gupta 129
 
36420 amit 130
    testCompile 'junit:junit:4.13.2'
131
    testCompile 'org.mockito:mockito-core:3.12.4'
132
    // Force byte-buddy: Spring Boot BOM downgrades to 1.7.11 which is incompatible with Mockito 3.12.
133
    testCompile 'net.bytebuddy:byte-buddy:1.11.13'
134
    testCompile 'net.bytebuddy:byte-buddy-agent:1.11.13'
36020 amit 135
 
23723 amit.gupta 136
}
137
 
37330 amit 138
defaultTasks 'run', 'build'
37334 amit 139
// Writes the module's runtime classpath to build/circular-classpath.txt so the
140
// offer-circular ingest can be driven locally outside Spring - see
141
// scripts/offer_circular/README.md ("Running and measuring an ingest locally").
142
// Originally added to diff the port against the reference Python implementation;
143
// that Python is gone, but the harness it enabled is still how an ingest is
144
// reproduced and measured, so this task stays.
37330 amit 145
task dumpCircularClasspath {
146
    doLast {
147
        new File("$buildDir/circular-classpath.txt").text =
148
                sourceSets.main.runtimeClasspath.asPath
149
    }
150
}