1
1
buildscript {
2
- ext. kotlin_version = ' 1.8 .22'
2
+ ext. kotlin_version = ' 1.9 .22'
3
3
4
4
repositories {
5
5
google()
@@ -32,8 +32,8 @@ ext.projectArtifactId = { Project project ->
32
32
33
33
allprojects {
34
34
group = ' kz.qbox.widget.webview'
35
- project. ext. version_code = 17
36
- version = ' 1.2.7 '
35
+ project. ext. version_code = 20
36
+ version = ' 1.3.0 '
37
37
project. ext. artifactId = rootProject. ext. projectArtifactId(project)
38
38
39
39
if (project. group != null ) {
@@ -83,18 +83,18 @@ subprojects { Project project ->
83
83
}
84
84
85
85
publishing {
86
- multipleVariants {
87
- allVariants ()
86
+ singleVariant( " release " ) {
87
+ withSourcesJar ()
88
88
}
89
89
}
90
90
91
91
compileOptions {
92
- sourceCompatibility JavaVersion . VERSION_11
93
- targetCompatibility JavaVersion . VERSION_11
92
+ sourceCompatibility JavaVersion . VERSION_17
93
+ targetCompatibility JavaVersion . VERSION_17
94
94
}
95
95
96
96
kotlinOptions {
97
- jvmTarget = JavaVersion . VERSION_11 . toString()
97
+ jvmTarget = JavaVersion . VERSION_17 . toString()
98
98
}
99
99
100
100
configurations. configureEach {
@@ -107,38 +107,34 @@ subprojects { Project project ->
107
107
}
108
108
109
109
afterEvaluate {
110
- publishing {
111
- publications {
112
- allVariants(MavenPublication ) {
113
- from components. default
114
-
115
- groupId project. group
116
- artifactId project. ext. artifactId
117
- version project. version
118
-
119
- pom {
120
- name = project. name
121
- url = ' https://github.com/zhombie/qbox-webview-widget-android'
122
-
123
- developers {
124
- developer {
125
- name = ' zhombie'
126
- }
127
- }
128
- }
110
+ android. libraryVariants. each { variant ->
111
+ publishing. publications. create(variant. name, MavenPublication ) {
112
+ from components. findByName(variant. name)
113
+
114
+ groupId project. group
115
+ artifactId project. ext. artifactId
116
+ version project. version
129
117
130
- pom. withXml {
131
- def dependenciesNode = asNode() . appendNode( ' dependencies ' )
132
- project . configurations . api . allDependencies . each { dependency ->
133
- def dependencyNode = dependenciesNode . appendNode( ' dependency ' )
134
- dependencyNode . appendNode( ' groupId ' , dependency . group)
135
- dependencyNode . appendNode( ' artifactId ' , dependency . name)
136
- dependencyNode . appendNode( ' version ' , dependency . version)
118
+ pom {
119
+ name = project . name
120
+ url = ' https://github.com/zhombie/qbox-webview-widget-android '
121
+
122
+ developers {
123
+ developer {
124
+ name = ' zhombie '
137
125
}
138
126
}
139
-
140
- artifact " $buildDir /outputs/aar/$project . name -release.aar"
141
127
}
128
+
129
+ // pom.withXml {
130
+ // def dependenciesNode = asNode().appendNode('dependencies')
131
+ // project.configurations.api.allDependencies.each { dependency ->
132
+ // def dependencyNode = dependenciesNode.appendNode('dependency')
133
+ // dependencyNode.appendNode('groupId', dependency.group)
134
+ // dependencyNode.appendNode('artifactId', dependency.name)
135
+ // dependencyNode.appendNode('version', dependency.version)
136
+ // }
137
+ // }
142
138
}
143
139
}
144
140
}
0 commit comments