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
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
    }
37726 amit 46
    // Sentry/GlitchTip reports ONLY from a deliberate staging/prod build, and is
47
    // labelled with that environment. A plain local build leaves the committed
48
    // enabled=false in place, so a developer's laptop cannot post to the live board.
49
    ant.propertyfile( file: "src/main/resources/sentry.properties"){
50
        entry( key: "enabled", value: (environment == "dev" ? "false" : "true"))
51
        entry( key: "environment", value: environment)
52
    }
34554 tejus.loha 53
    logger.info("Build is being built by " + environment)
23723 amit.gupta 54
}
55
 
35832 amit 56
tasks.build.doLast() {
57
    ant.propertyfile(file: "src/main/resources/META-INF/env.property") {
58
        entry(key: "profile", value: "dev")
59
    }
37726 amit 60
    ant.propertyfile( file: "src/main/resources/sentry.properties"){
61
        entry( key: "enabled", value: "false")
62
        entry( key: "environment", value: "dev")
63
    }
35832 amit 64
}
23723 amit.gupta 65
 
35832 amit 66
 
23723 amit.gupta 67
dependencies {
30212 amit.gupta 68
    compile('org.springframework.boot:spring-boot-starter') {
69
        exclude(module: 'logback-classic')
70
        exclude(module: 'spring-boot-starter-logging')
71
    }
72
    implementation group: 'org.springframework', name: 'spring-context-support', version: '4.3.6.RELEASE'
73
 
74
    compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
75
    compile project(':profitmandi-common')
76
    compile project(':profitmandi-dao')
24434 amit.gupta 77
    compile 'com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6'
30212 amit.gupta 78
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6:'
79
    compile 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6'
80
    compile group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
81
    compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '2.41.0'
82
    implementation 'org.jsoup:jsoup:1.11.3'
83
    implementation 'org.apache.httpcomponents:httpclient:4.5.13'
84
    implementation 'org.bouncycastle:bcprov-jdk16:1.45'
34101 amit.gupta 85
    //dependency needed to resolve okhttp and further required for selenium
35851 amit 86
    implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0'
34101 amit.gupta 87
 
30212 amit.gupta 88
    // https://mvnrepository.com/artifact/opencv/opencv
35851 amit 89
    implementation group: 'org.openpnp', name: 'opencv', version: '3.4.2-0'
34039 vikas.jang 90
    implementation('com.google.auth:google-auth-library-oauth2-http:1.17.0') {
91
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
92
        exclude group: 'com.google.guava', module: 'guava'
93
    }
30212 amit.gupta 94
 
35832 amit 95
    dependencies {
96
        implementation 'org.jsoup:jsoup:1.18.1'
97
    }
34094 amit.gupta 98
 
35832 amit 99
 
100
 
34554 tejus.loha 101
    implementation('org.springframework.boot:spring-boot-starter-actuator') {
102
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
103
    }
104
 
105
    implementation('io.micrometer:micrometer-core') {
106
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
107
    }
108
 
109
    implementation('io.micrometer:micrometer-registry-prometheus') {
110
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
111
    }
112
 
113
    implementation 'org.springframework.boot:spring-boot-starter-log4j2'
114
 
37491 amit 115
    // Ships ERROR-level log events to GlitchTip (self-hosted, Sentry protocol).
116
    // Pinned to 7.x: 8.x drops Java 8. Verified class major version 52.
117
    implementation 'io.sentry:sentry-log4j2:7.22.6'
118
 
119
 
34554 tejus.loha 120
    implementation('org.springframework.boot:spring-boot-starter-web') {
121
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
122
    }
123
    implementation 'org.aspectj:aspectjweaver'
124
    implementation ('org.springframework.boot:spring-boot-starter-security'){
125
        exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
126
    }
127
 
34688 amit.gupta 128
 
129
    // Add HikariCP dependency
130
    implementation 'com.zaxxer:HikariCP:3.4.5' // Use the latest version
34860 ranu 131
    implementation 'net.lingala.zip4j:zip4j:2.11.5'
34688 amit.gupta 132
 
36420 amit 133
    testCompile 'junit:junit:4.13.2'
134
    testCompile 'org.mockito:mockito-core:3.12.4'
135
    // Force byte-buddy: Spring Boot BOM downgrades to 1.7.11 which is incompatible with Mockito 3.12.
136
    testCompile 'net.bytebuddy:byte-buddy:1.11.13'
137
    testCompile 'net.bytebuddy:byte-buddy-agent:1.11.13'
36020 amit 138
 
23723 amit.gupta 139
}
140
 
37330 amit 141
defaultTasks 'run', 'build'