-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
154 lines (137 loc) · 4.38 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'maven-publish'
id 'signing'
id 'org.jetbrains.dokka'
}
ext {
PUBLISH_GROUP_ID = 'com.suzukiplan'
PUBLISH_ARTIFACT_ID = 'msx2'
PUBLISH_VERSION = '0.1'
}
android {
compileSdk 33
defaultConfig {
minSdk 26
targetSdk 33
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
ndk {
moduleName "msx2"
abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
}
externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_static"
cFlags "-fPIC " +
"-ffast-math " +
"-fsigned-char " +
"-Ofast " +
"-D__ANDROID__ " +
"-DFIXED_POINT " +
"-DNDEBUG "
cppFlags "-Ofast " +
"-fPIC " +
"-ffast-math " +
"-fsigned-char " +
"-DNDEBUG "
}
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
externalNativeBuild {
cmake {
path file('src/main/cpp/CMakeLists.txt')
version '3.18.1'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
}
task androidSourcesJar(type: Jar) {
archiveClassifier.set('sources')
from android.sourceSets.main.java.srcDirs
from android.sourceSets.main.kotlin.srcDirs
}
tasks.dokkaHtml.configure {
outputDirectory.set(file("../documentation/html"))
}
tasks.withType(dokkaHtml.getClass()).configureEach {
pluginsMapConfiguration.
set(["org.jetbrains.dokka.base.DokkaBase": """{ "separateInheritedMembers": true}"""])
}
task javadocJar(type: Jar, dependsOn: dokkaJavadoc) {
archiveClassifier.set('javadoc')
from dokkaJavadoc.outputDirectory
}
artifacts {
archives androidSourcesJar
archives javadocJar
}
signing {
useInMemoryPgpKeys(
rootProject.ext["signing.keyId"],
rootProject.ext["signing.key"],
rootProject.ext["signing.password"]
)
sign publishing.publications
}
group = PUBLISH_GROUP_ID
version = PUBLISH_VERSION
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
groupId PUBLISH_GROUP_ID
artifactId PUBLISH_ARTIFACT_ID
version PUBLISH_VERSION
// Two artifacts, the `aar` (or `jar`) and the sources
if (project.plugins.findPlugin("com.android.library")) {
from components.release
} else {
from components.java
}
artifact androidSourcesJar
artifact javadocJar
pom {
name = PUBLISH_ARTIFACT_ID
description = 'MSX2+ emulator specialized for embedded applications'
url = 'https://github.com/suzukiplan/micro-msx2p/tree/master/msx2-android'
licenses {
license {
name = 'MIT'
url = 'https://github.com/suzukiplan/micro-msx2p/blob/master/LICENSE.txt'
}
}
developers {
developer {
id = 'suzukiplan'
name = 'Yoji Suzuki'
email = '[email protected]'
}
}
scm {
connection = 'https://github.com/suzukiplan/micro-msx2p.git'
developerConnection = 'scm:git:ssh://github.com/suzukiplan/micro-msx2p.git'
url = 'https://github.com/suzukiplan/micro-msx2p/tree/master/msx2-android'
}
}
}
}
}
}