-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbuild.gradle
109 lines (94 loc) · 3.25 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
// maven { url 'http://192.168.2.39:8908/repository/maven-public/' }
maven { url 'https://maven.aliyun.com/repository/public' }
google()
mavenCentral()
}
// dependencies {
// classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// }
}
plugins {
id 'org.jetbrains.intellij' version '1.5.3'
// id 'java'
id 'org.jetbrains.kotlin.jvm' version "$kotlin_version"
}
version '1.4.6'
group 'com.longforus'
//apply plugin: 'java'
//apply plugin: 'kotlin'
//apply plugin: 'kotlin-kapt'
//apply plugin: 'org.jetbrains.intellij'
sourceCompatibility = 11
targetCompatibility = 11
//sourceSets {
// main {
// java {
// srcDir "${project.rootDir.absolutePath}/thirdParty/javapoet/java/src"
// }
// }
//}
repositories {
// maven{ url 'http://192.168.2.39:8908/repository/maven-public/'}
maven { url 'https://maven.aliyun.com/repository/public' }
google()
mavenCentral()
}
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
if (!hasProperty('StudioCompilePath')) {
throw new GradleException("No StudioCompilePath value was set, please create gradle.properties file")
}
intellij {
pluginName='MvpAutoCodePlus'
// version '2021.1.3'
// type 'IC'
plugins=['java','android']
// plugins 'org.jetbrains.kotlin:212-1.6.20-release-275-AS5457.46' //here
updateSinceUntilBuild=false
downloadSources=true
localPath = project.hasProperty("StudioRunPath") ? StudioRunPath : StudioCompilePath
}
dependencies {
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// compileOnly fileTree(dir: "$StudioCompilePath/plugins/android/lib", include: ['*.jar'])
// compileOnly fileTree(dir: "$StudioCompilePath/plugins/java/lib", include: ['*.jar'])
// compileOnly fileTree(dir: "$StudioCompilePath/lib", include: ['*.jar'])
//
// testImplementation fileTree(dir: "$StudioCompilePath/plugins/android/lib", include: ['*.jar'])
// testImplementation fileTree(dir: "$StudioCompilePath/plugins/java/lib", include: ['*.jar'])
// testImplementation fileTree(dir: "$StudioCompilePath/lib", include: ['*.jar'])
// implementation "com.jetbrains.intellij.java:java-psi:192.7142.36"
// compileOnly "com.android.tools.build:gradle:3.6.1"
// compileOnly "com.android.tools.build:gradle:4.2.2"
// compileOnly "com.jetbrains.intellij.java:java:192.7142.36"
// Implementation 'com.squareup:javapoet:1.11.0'
// testImplementation group: 'junit', name: 'junit', version: '4.12'
}
patchPluginXml {
changeNotes="""<h3>Adapter Android studio 2021.3.1 P1</h3>
<br/>
<a href="https://github.com/longforus/MvpAutoCodePlus/blob/master/CHANGELOG.md"><b>Full Changelog History</b></a>"""
}
//publishPlugin {
// token publishToken
//}
//指定编译的编码
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
task verifySetup() {
doLast {
def ideaJar = "$StudioCompilePath/lib/idea.jar"
if (!file(ideaJar).exists()) {
throw new GradleException("$ideaJar not found, set StudioCompilePath in gradle.properties")
}
}
}
compileJava.dependsOn verifySetup