Skip to content

Commit 3e7ff94

Browse files
authored
Gradle cleanup (#1569)
* Remove intellij files from source control * Remove old gradle provided * Use javac release option * Clean up .gitignore * More cleanup * Fix build
1 parent 52b3101 commit 3e7ff94

File tree

50 files changed

+194
-430
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+194
-430
lines changed

.gitignore

+4-100
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,7 @@
1-
#Visual Studio files
2-
*.o
3-
*.d
4-
*.so
5-
*.class
6-
*.sdf
7-
*.opensdf
8-
*.suo
9-
*.user
10-
bin/
11-
Debug/
12-
Release/
13-
ipch/
14-
classpath.txt
15-
javaconfig.json
16-
17-
# Eclipse
18-
.classpath
19-
.project
20-
.settings/
21-
221
# Gradle
23-
.gradle
2+
/.gradle/
3+
/buildSrc/.gradle/
244
build/
25-
26-
# Ignore Gradle GUI config
27-
gradle-app.setting
28-
29-
30-
# Ignore all xml in idea (keep codeStyles)
31-
.idea/*.xml
32-
33-
## Directory-based project format:
34-
# User-specific stuff:
35-
.idea/workspace.xml
36-
.idea/tasks.xml
37-
.idea/dictionaries
38-
39-
40-
# Sensitive or high-churn files:
41-
.idea/dataSources.ids
42-
.idea/dataSources.xml
43-
.idea/sqlDataSources.xml
44-
.idea/dynamic.xml
45-
.idea/uiDesigner.xml
46-
47-
48-
# Gradle:
49-
.idea/gradle.xml
50-
.idea/libraries
51-
52-
53-
# Mongo Explorer plugin:
54-
.idea/mongoSettings.xml
55-
56-
57-
## File-based project format:
58-
*.ipr
59-
*.iws
60-
61-
62-
## Plugin-specific files:
63-
64-
# IntelliJ
65-
out/
66-
67-
# mpeltonen/sbt-idea plugin
68-
.idea_modules/
69-
70-
71-
# JIRA plugin
72-
atlassian-ide-plugin.xml
73-
74-
75-
# Crashlytics plugin (for Android Studio and IntelliJ)
76-
com_crashlytics_export_strings.xml
77-
78-
# Mac
79-
.DS_Store
80-
81-
# Click-Once directory
82-
publish/
83-
84-
# Windows image file caches
85-
Thumbs.db
86-
ehthumbs.db
87-
88-
# Folder config file
89-
Desktop.ini
90-
91-
# Recycle Bin used on file shares
92-
$RECYCLE.BIN/
93-
/Backend/OrderService/.gradle/1.11/taskArtifacts
94-
/Backend/OrderService/build
95-
/Backend/OrderService/.idea
96-
Backend/OrderService/OrderService.iml
97-
98-
# VS Code Workspace settings
99-
.vscode/settings.json
1005

101-
# Visual Studio
102-
.vs
103-
.idea/.name
6+
# Intellij
7+
/.idea/

.idea/codeStyles/Project.xml

-69
This file was deleted.

.idea/codeStyles/codeStyleConfig.xml

-5
This file was deleted.

build.gradle

-22
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2121
* DEALINGS IN THE SOFTWARE.
2222
*/
2323

24-
// region Common configurations
25-
2624
plugins {
2725
id 'idea'
2826

@@ -37,10 +35,6 @@ ext.buildScriptsDir = "$rootDir/gradle"
3735

3836
apply from: "$buildScriptsDir/common.gradle"
3937

40-
// endregion Common configurations
41-
42-
// region Root project script
43-
4438
ext {
4539
isBuildServer = (System.properties["isBuildServer"] ?: "false").toBoolean()
4640
isRelease = (System.properties["isRelease"] ?: "false").toBoolean()
@@ -85,15 +79,6 @@ allprojects {
8579
}
8680
}
8781

88-
tasks.withType(JavaCompile) {
89-
doFirst {
90-
logger.info("sourceCompatibility = $sourceCompatibility")
91-
logger.info("tatgetCompatibility = $targetCompatibility")
92-
logger.info("options.bootstrapClasspath = $options.bootstrapClasspath")
93-
logger.info("options.compilerArgs = $options.compilerArgs")
94-
}
95-
}
96-
9782
tasks.withType(ShadowJar) {
9883
exclude 'META-INF/maven/**'
9984
exclude 'META-INF/LICENSE*'
@@ -108,10 +93,3 @@ allprojects {
10893
from "${rootProject.projectDir}/LICENSE"
10994
}
11095
}
111-
112-
wrapper {
113-
distributionType = Wrapper.DistributionType.ALL
114-
}
115-
116-
// endregion Root project script
117-

core/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ import com.microsoft.applicationinsights.build.tasks.PropsFileGen
3636

3737
archivesBaseName = 'applicationinsights-core'
3838

39-
apply from: "$buildScriptsDir/provided-configuration.gradle"
40-
4139
configurations {
4240
forTheDLL { transitive = false }
4341
}

etw/etw-testapp/build.gradle

+6-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,9 @@ repositories {
1515
apply plugin: 'war'
1616
apply plugin: 'org.springframework.boot'
1717

18-
sourceCompatibility = 1.8
19-
targetCompatibility = 1.8
20-
2118
dependencies {
22-
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
23-
providedCompile project(path:':agent:agent', configuration:'devtest')
19+
compileOnly 'javax.servlet:javax.servlet-api:3.0.1'
20+
compileOnly project(path:':agent:agent', configuration:'devtest')
2421

2522
implementation ('org.springframework.boot:spring-boot-starter-web:2.1.7.RELEASE') {
2623
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat'
@@ -29,3 +26,7 @@ dependencies {
2926

3027
testImplementation 'junit:junit:4.12'
3128
}
29+
30+
tasks.withType(JavaCompile) {
31+
options.release.set(8)
32+
}

etw/java/build.gradle

-5
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ repositories {
2727
}
2828

2929
apply from: "$buildScriptsDir/common-java.gradle"
30-
apply from: "$buildScriptsDir/provided-configuration.gradle"
3130

3231
configurations {
3332
jni64 {
@@ -36,10 +35,6 @@ configurations {
3635
jni32 {
3736
transitive = false
3837
}
39-
provided {
40-
transitive = false
41-
}
42-
testRuntime.extendsFrom provided
4338
}
4439

4540
def jniSrcDir = 'src/main/jni'

gradle/common-java.gradle

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
// region Shared java configuration
2323

24-
import org.gradle.internal.os.OperatingSystem;
2524
import org.gradle.api.tasks.testing.logging.TestLogEvent;
2625
import org.gradle.api.tasks.testing.logging.TestExceptionFormat;
2726

@@ -31,9 +30,6 @@ apply plugin: 'checkstyle'
3130
apply plugin: 'org.owasp.dependencycheck'
3231
apply plugin: 'com.github.spotbugs'
3332

34-
sourceCompatibility = 1.8
35-
targetCompatibility = 1.8
36-
3733
configurations {
3834
compileClasspath.resolutionStrategy.activateDependencyLocking()
3935
runtimeClasspath.resolutionStrategy.activateDependencyLocking()
@@ -56,6 +52,7 @@ spotbugs {
5652
excludeFilter = spotbugsExcludeFile
5753
}
5854
}
55+
spotbugsTest.enabled = false
5956

6057
spotbugsTest.enabled = false
6158

gradle/provided-configuration.gradle

-5
This file was deleted.

test/fakeIngestion/servlet/build.gradle

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ repositories {
77

88
dependencies {
99
compile 'com.google.guava:guava:23.0'
10-
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
10+
compileOnly 'javax.servlet:javax.servlet-api:3.0.1'
1111
compile 'com.google.code.gson:gson:2.8.2'
1212
compile project(':core')
1313
compile project(':test:smoke:framework:utils')
1414

1515
}
1616

17-
sourceCompatibility = 1.8
17+
tasks.withType(JavaCompile) {
18+
options.release.set(8)
19+
}

test/fakeIngestion/standalone/build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ dependencies {
1616

1717
mainClassName = 'com.microsoft.applicationinsights.test.fakeingestion.MockedAppInsightsIngestionServer'
1818

19-
sourceCompatibility = 1.8
19+
tasks.withType(JavaCompile) {
20+
options.release.set(8)
21+
}

test/smoke/framework/testCore/build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ dependencies {
1313
compile project(':test:fakeIngestion:standalone')
1414
}
1515

16-
sourceCompatibility = 1.8
16+
tasks.withType(JavaCompile) {
17+
options.release.set(8)
18+
}

test/smoke/framework/utils/build.gradle

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ dependencies {
1515
testCompile 'junit:junit:4.12'
1616
}
1717

18-
sourceCompatibility = 1.8
18+
tasks.withType(JavaCompile) {
19+
options.release.set(8)
20+
}

test/smoke/testApps/ActuatorMetrics/build.gradle

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ plugins {
33
id 'org.springframework.boot' version '2.1.7.RELEASE'
44
}
55

6-
sourceCompatibility = 1.8
7-
targetCompatibility = 1.8
8-
compileSmokeTestJava.sourceCompatibility = 1.8
9-
compileSmokeTestJava.targetCompatibility = 1.8
10-
116
ext.testAppArtifactDir = jar.destinationDirectory
127
ext.testAppArtifactFilename = jar.archiveFileName.get()
138

149
dependencies {
1510
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.7.RELEASE'
1611
compile group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '2.1.7.RELEASE'
1712
}
13+
14+
tasks.withType(JavaCompile) {
15+
options.release.set(8)
16+
}

0 commit comments

Comments
 (0)