File tree Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Expand file tree Collapse file tree 2 files changed +49
-2
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,23 @@ plugins {
3
3
id ' java-library'
4
4
}
5
5
6
+ plugins {
7
+ id ' maven-publish'
8
+ }
9
+
6
10
// Package default
7
11
archivesBaseName = ' google-search-results-java'
8
12
version = ' 2.0.1'
9
13
group = ' serpapi'
10
14
15
+ // java version
16
+ sourceCompatibility = 1.8
17
+ targetCompatibility = 1.8
18
+
11
19
// Load repositories
12
20
repositories {
13
- jcenter()
21
+ // jcenter()
22
+ mavenCentral()
14
23
}
15
24
16
25
// compileTestJava {
@@ -26,12 +35,50 @@ dependencies {
26
35
27
36
// Mockito
28
37
testImplementation ' org.mockito:mockito-core:3.6.28'
38
+
39
+ // javadoc markdown support doesn't work with modern java and gradle.
29
40
}
30
41
42
+ // jar file content
31
43
tasks. named(' jar' ) {
32
44
manifest {
33
45
attributes(' Implementation-Title' : project. name,
34
46
' Implementation-Version' : project. version)
35
47
}
36
48
}
37
49
50
+ task sourcesJar (type : Jar , dependsOn : classes) {
51
+ classifier = ' sources'
52
+ from sourceSets. main. allSource
53
+ }
54
+
55
+ task javadocJar (type : Jar , dependsOn : javadoc) {
56
+ classifier = ' javadoc'
57
+ from javadoc. destinationDir
58
+ }
59
+
60
+ artifacts {
61
+ archives sourcesJar
62
+ archives javadocJar
63
+ }
64
+
65
+ // To specify a license in the pom:
66
+ publishing {
67
+ publications {
68
+ mavenJava(MavenPublication ) {
69
+ pom {
70
+ licenses {
71
+ license {
72
+ name = ' MIT License'
73
+ url = ' https://github.com/serpapi/google-search-results-java/blob/master/LICENSE'
74
+ }
75
+ }
76
+ }
77
+ }
78
+ }
79
+ }
80
+
81
+ wrapper {
82
+ gradleVersion = " 7.3.3"
83
+ distributionType = Wrapper.DistributionType . ALL
84
+ }
Original file line number Diff line number Diff line change 1
1
distributionBase =GRADLE_USER_HOME
2
2
distributionPath =wrapper/dists
3
- distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3-bin .zip
3
+ distributionUrl =https\://services.gradle.org/distributions/gradle-7.3.3-all .zip
4
4
zipStoreBase =GRADLE_USER_HOME
5
5
zipStorePath =wrapper/dists
You can’t perform that action at this time.
0 commit comments